Computing.Net > Forums > Disk Operating System > Need copy result in my log file (ba

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Need copy result in my log file (ba

Reply to Message Icon

Name: SnapsDK
Date: April 3, 2003 at 10:57:46 Pacific
OS: Windows 2000
CPU/Ram: 1,4/512
Comment:


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



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: April 4, 2003 at 16:15:16 Pacific
Reply:

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


0

Response Number 2
Name: Miskva
Date: April 6, 2003 at 10:35:01 Pacific
Reply:

.. 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


0
Reply to Message Icon

Related Posts

See More


Batch file and the net se... Maxi Studio ISIS in dos



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Need copy result in my log file (ba

store processing result in a text file www.computing.net/answers/dos/store-processing-result-in-a-text-file/7409.html

Unable to clear text in a log file www.computing.net/answers/dos/unable-to-clear-text-in-a-log-file/16832.html

Inserting date/time in log file www.computing.net/answers/dos/inserting-datetime-in-log-file/8988.html