Question : Batch File: Robocopy

Hi there,

I have this Robocopy command line that needs to be "fixed".

Robocopy "!BasePath_Source!" "!BasePath_Dest!" * /TEE /ETA /E /COPYALL /MIR /NP /ZB /LOG+:"%File_LOG_Mirror%_temp.TXT" /XF Thumbs.db ~*.* *.swp *.dmp *.tmp pagefile.sys hiberfil.sys /XD MCAF*.TMP "$VAULT$.AVG" "_RESTORE" "MSOCache" "Recycled" "RECYCLER" "Temporary Internet Files" "System Volume Information" "Virtual Machines *" "temp" ISO

PROBLEM:
-------------------------------------------------------------
The LOG file stores all the files = NO GOOD

I need that the LOG file only logs the new, or changed files = GOOD

Thanks for your help,
Rene


Answer : Batch File: Robocopy

Add the following options to your command.
    /NDL    Exclude directory names (listing)
    /XO     Exclude Old files
    /XX      Exclude Extra files (files in the destination, but not in the original source)

You may want to use this option, but most likely not.
    /XL     Exclude Lonely (Unique files are not copied)

New command:
Robocopy "!BasePath_Source!" "!BasePath_Dest!" * /NDL /XX /XO /TEE /ETA /E /COPYALL /MIR /NP /ZB /LOG+:"%File_LOG_Mirror%_temp.TXT" /XF Thumbs.db ~*.* *.swp *.dmp *.tmp pagefile.sys hiberfil.sys /XD MCAF*.TMP "$VAULT$.AVG" "_RESTORE" "MSOCache" "Recycled" "RECYCLER" "Temporary Internet Files" "System Volume Information" "Virtual Machines *" "temp" ISO

Random Solutions  
 
programming4us programming4us