How to robocopy with progress logged to console only?
Solution 1:
As nobody has answered this for so long, I thought I'd suggest a couple of things.
If you are using batch scripts, it should not be too difficult to use sed to strip out the unwanted progress information from the log file. I'm not experienced enough with it to give you a solution using it without spending some time on it though.
There is a single .exe file version of sed
in UnxUtils (with a slightly more up to date version in the update zip).
Another option would be to use XXCOPY instead of Robocopy
. It has a truly ridiculous number of switches (over 230), which allows you to do whatever you want. You have to spend a whole evening choosing which ones you want to use. It also has a GUI progress dialogue box, if you would prefer to use that.
There is a free version for personal use, which cannot be used for automated scripting, as you need to interactively follow prompts, unlike the paid-for version.
Another alternative is RichCopy, which has a GUI which would can use to choose your options. It can then give you the command-line of you operation for use in batch scripts.
Solution 2:
Solution: use just /TEE and let it log the 'noise', otherwise you'll not see any progress. Then use sed, as first suggested to clean the logfile as follows:
sed -i.bak "s/\x0d.\*\x0d.\*$//" logfile.txt
Remove the .bak
if you don't want an unfixed backup. sed
is available for windows here, and works fine, at least for single* line use.
http://gnuwin32.sourceforge.net
sed
command in Unix bash/cshell
scripts are often spread over multiple lines, adding more flexibility and complexity. I don't expect those type of sed
command to work with Windows cmd
scripts, but sed
is still useful under Windows.