how to export the logs in batch

October 12, 2011 at 13:50:18
Specs: Windows XP
I have created a basic batch file to copy data from one drive to other as below and it is working fine.

@echo off
set /p m=Provide source H drive path:
set /P n=Provide destination H drive path:
cd C:\Documents and Settings\karupra\Robocopy
robocopy %m% %n% /e /s /w:5 /r:5

But pls can any one tell me how to export below logs of above script in to a notepad?? Also pls let me know where can I find a complete trainig material for batch programming.

------------------------------------------------------------------------------
ROBOCOPY v 1.95 : Robust File Copy for Windows NT : by kevina@microsoft.co
------------------------------------------------------------------------------

Started : Thu Oct 13 02:12:09 2011

Source : \\dbg.ads.db.com\IND-DBOI-USERS\VF86USERS01_250MB\karupra\file1\
Dest : \\dbg.ads.db.com\IND-DBOI-USERS\VF86USERS01_250MB\karupra\file2\
Files : *.*
Options : *.* /S /R:5 /W:5

------------------------------------------------------------------------------

31 \\dbg.ads.db.com\IND-DBOI-USERS\VF86USERS01_
0MB\karupra\file1\
100% New File 0 Copy (10) of sddsds.txt
100% New File 0 Copy (11) of sddsds.txt
100% New File 0 Copy (12) of sddsds.txt
100% New File 0 Copy (13) of sddsds.txt
100% New File 0 Copy (14) of sddsds.txt
100% New File 0 Copy (15) of sddsds.txt
100% New File 0 Copy (16) of sddsds.txt
100% New File 0 Copy (17) of sddsds.txt
100% New File 0 Copy (18) of sddsds.txt
100% New File 0 Copy (19) of sddsds.txt
100% New File 0 Copy (2) of sddsds.txt
100% New File 0 Copy (20) of sddsds.txt
100% New File 0 Copy (21) of sddsds.txt
100% New File 0 Copy (22) of sddsds.txt
100% New File 0 Copy (23) of sddsds.txt
100% New File 0 Copy (24) of sddsds.txt
100% New File 0 Copy (25) of sddsds.txt
100% New File 0 Copy (26) of sddsds.txt
100% New File 0 Copy (27) of sddsds.txt
100% New File 0 Copy (28) of sddsds.txt
100% New File 0 Copy (29) of sddsds.txt
100% New File 0 Copy (3) of sddsds.txt
100% New File 0 Copy (30) of sddsds.txt
100% New File 0 Copy (4) of sddsds.txt
100% New File 0 Copy (5) of sddsds.txt
100% New File 0 Copy (6) of sddsds.txt
100% New File 0 Copy (7) of sddsds.txt
100% New File 0 Copy (8) of sddsds.txt
100% New File 0 Copy (9) of sddsds.txt
100% New File 0 Copy of sddsds.txt

------------------------------------------------------------------------------

Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 31 30 1 0 0 0
Bytes : 0 0 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00

Ended : Thu Oct 13 02:12:10 2011


See More: how to export the logs in batch

Report •

#1
October 12, 2011 at 16:56:31
Robocopy has built-in logging capability.

/LOG:file :: output status to LOG file (overwrite existing log).
/LOG+:file :: output status to LOG file (append to existing log).

You can add the /LOG or /LOG+ modifier to your robocopy line.

I'm not sure about the complete documentation for batch programming. I've never seen anything like that. You can get the full documentation for any individual command by typing the command and /? at the prompt.

robocopy /?


Report •
Related Solutions


Ask Question