Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need a simple way to show the result of a file copy in a log file.My batch file copies some files i need the result in my log file.
Plz help me
Thx
Willy

This command, for instance, will send its output to the screen:
copy file1.dat file2.dat
To get the output inside a file, do:
copy file1.dat file2.dat > log.txt
That will only redirect the messages identified as "standard" to the file, the ones identified as "error messages" will still be shown. To redirect both, use:
copy file1.dat file2.dat 1>2> log.txt
Is that what you wanted?
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

.. or checking on the targetfile
if exist C:\target.txt goto ok
goto sub_end
:ok
echo File has been copied to C:\target.txt >> c:\logfile.txt
goto sub_end
:sub_end

![]() |
Batch file and the net se...
|
Maxi Studio ISIS in dos
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |