Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello everyone,
my interest is that if I write a batch file to copy files from one location to another location. The as the batch file is running we can see the processing status on the screen straight away. What if I want to store those processing results in a text file (log file) so that later on we can open that file to check whether how many files have been copied and if the operations of the batch file were all succesllfully carried out.
I know that in Oracle it use "spool command". What about in DOS? Is there any commands or techniques we can use?
Thank you in advance.Sam Phengmaly.

Redirect the output of the copy cmds to a file, like this:
copy a b> out.txt
copy c d>> out.txt
copy e f>> out.txt">" will redirect to the file, erasing all previous data saved on it
">>" will append the output to the file, leaving the previous dataBut it wouldn't display the output at the screen anymore, as you wanted (you won't see the progress)
so you could do something like this:
copy a b> out2.txt
type out2.txt
copy out.txt+out2.txt out.txt
copy c d> out2.txt
type out2.txt
copy out.txt+out2.txt out.txtand so on
-- Secret_Doom --

![]() |
my ram
|
Can a batch file count di...
|

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