Dumping the console

Locked
ilumos
Posts: 226
Joined: Wed Feb 09, 2005 10:46 am

Dumping the console

Post by ilumos »

Ok, so I run an automated batch script that backs up my server/downloader PC, and I'd like to have a log of exactly what was and wasnt backed up, and the most useful way of doing that would be at the end of the batch script have a line of code that dumps every line echoed to a text file.

Is there a way to do this? (I've tried google)

Using cmd on XP Pro SP2


Thanks
Tormentius
Posts: 4108
Joined: Sat Dec 14, 2002 8:00 am

Post by Tormentius »

ilumos
Posts: 226
Joined: Wed Feb 09, 2005 10:46 am

Post by ilumos »

Sorry, I should have been clearer. I'm not using the XP/2k backup tool (the one that makes the bkfs) I'm just using xcopy and winzip command line, but I'd like a log of what the batch file echoes on screen, i.e. errors in copying, read only errors and stuff like that. Basically, a dump of whatever is in the cmd window. e.g:

Code: Select all

C:\xcopy "C:\a\*.*" "C:\b\*.*" -f -d -x

Copying a
copying b

Thanks :)
4days
Posts: 5465
Joined: Tue Apr 16, 2002 7:00 am

Post by 4days »

C:\xcopy "C:\a\*.*" "C:\b\*.*" -f -d -x > C:\myfile.txt

?
ilumos
Posts: 226
Joined: Wed Feb 09, 2005 10:46 am

Post by ilumos »

Perfect! Thanks loads :)
Underpants?
Posts: 4755
Joined: Mon Oct 22, 2001 7:00 am

Post by Underpants? »

4days wrote:C:\xcopy "C:\a\*.*" "C:\b\*.*" -f -d -x > C:\myfile.txt

?
:)
Locked