Computing.Net > Forums > Disk Operating System > store processing result in a text file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

store processing result in a text file

Reply to Message Icon

Name: Sam Phengmaly
Date: July 22, 2001 at 19:52:50 Pacific
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: July 22, 2001 at 21:09:06 Pacific
Reply:

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 data

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

and so on

-- Secret_Doom --


0

Response Number 2
Name: astroraptor
Date: July 22, 2001 at 21:11:01 Pacific
Reply:

Example: DIR /B >>CMD.LOG

Basically, any command with ">>FILENAME.EXT"

Hope that helps


0

Response Number 3
Name: jboy
Date: July 22, 2001 at 22:40:58 Pacific
Reply:

... but you can't redirect the batch file itself, have to do it from within the batch.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


my ram Can a batch file count di...



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: store processing result in a text file

copying files listed in a text file www.computing.net/answers/dos/copying-files-listed-in-a-text-file/7341.html

how to check IIS in a batch file www.computing.net/answers/dos/how-to-check-iis-in-a-batch-file/14346.html

Extracting blocks of text in from text files www.computing.net/answers/dos/extracting-blocks-of-text-in-from-text-files-/16952.html