Currently with this command:

robocopy Y:\source X:\target\Test /log:Y:\source\dem.txt /s /njh /njs /nc /np /ns /tee

I am able to create a log file (dem.txt) which contains the name of the files copied and also name their source folder. However, I want my log file to display something like

NameOfFile has been successfully copied from PathOfSource to PathOfTarget

Note: My Source Folder has sub-folders inside which assets are stored. few assets are in root folder as well

Is there a way in which I can append this text in my log file?

1 Answer 1


Based from this example: https://stackoverflow.com/questions/23274387/batch-file-prompt-for-source-destination-with-robocopy you can set the variables in a .bat file using SET and then ECHO after the copying is done.

To add the text, see https://stackoverflow.com/questions/5139157/append-text-with-bat

  • This doesn't answer my question as it is not modifying/adding any text to the log file as desired by me Commented Oct 23, 2015 at 7:47
  • @YashSaraiya added more info on the ECHO
    – user4100
    Commented Oct 23, 2015 at 7:48
  • I cannot make it work.... Is there a way in which we can do this using only robocopy (no batch files and scripts) ? Commented Oct 23, 2015 at 8:00
  • @YashSaraiya No. There is no way to customise Robocopy log files other than by using the flags you have already discovered. Any other customisation requires using a different approach (some form of scripting). In that case you might as well do the whole thing in custom script and not use robocopy at all!
    – DavidPostill
    Commented Oct 23, 2015 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .