Okay, here's some code to demonstrate what I'm talking about.
Save this code as a batch file, and run it:
for %%a in ("%windir%\*.exe") do SQLCMD -S ServerName -d master -E -Q"set nocount on;select '%%a'" -o "%temp%\output.txt"
type %temp%\output.txt
pause
cls
echo %date% %time% > "%temp%\output.txt
for %%a in ("%windir%\*.exe") do SQLCMD -S ServerName -d master -E -Q"set nocount on;select '%%a'" >> "%temp%\output.txt"
type %temp%\output.txt
pause
del %temp%\output.txt
At the first pause, the contents of the output file are displayed. All that is in it is the last *.exe.
At the second pause, the contents of the output file are again displayed. The prior contents are erased, and all exe files are listed.
This demonstrates the point the OP was making.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes