Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Saturday, July 4, 2020 10:55 AM
I'm using Robocopy with the following switches:
/MIR /xf desktop.ini /e /np /tee
Is there an additional switch I can use to display new and/or changed files only? Now it is scrolling through all the files in the window view.
Thanks in advance for your help.
All replies (7)
Friday, July 10, 2020 1:57 AM âś…Answered
In both, they display each file on the screen.
Those are not files. They are the folder names with the file count in each folder. Ie, there are 14 files in D:\sfd\dtsc.
Try the /nfl and /ndl switches.
Robocopy /?
::
:: Logging Options :
::
/L :: List only - don't copy, timestamp or delete any files.
/X :: report all eXtra files, not just those selected.
/V :: produce Verbose output, showing skipped files.
/TS :: include source file Time Stamps in the output.
/FP :: include Full Pathname of files in the output.
/BYTES :: Print sizes as bytes.
/NS :: No Size - don't log file sizes.
/NC :: No Class - don't log file classes.
** /NFL :: No File List - don't log file names.**
** /NDL :: No Directory List - don't log directory names.**
Saturday, July 4, 2020 12:52 PM
The first time that you run robocopy it will show all files as it copies them. When it's done, If you would immediately rerun the same command, it should examine all the files and detect that nothing has changed and just show the file count in folders. The "Copied" column in the report should show 0 files and folders copied. The "Skipped" column shows the count of files that were not copied because they match existing files.
After files have been added/updated/deleted in the source folder, you can use the /l switch to get a list of the files that robocopy would copy, but it does not actually do the copy.
C:\>robocopy c:\temp\dlls e:\temp\dlls /mir /np
ROBOCOPY :: Robust File Copy for Windows
Started : Saturday, July 4, 2020 8:53:56 AM
Source : c:\temp\dlls\
Dest = e:\temp\dlls\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30
New Dir 5 c:\temp\dlls\
New File 163480 comdlg32.ocx
New File 179352 MSMASK32.OCX
New File 1.2 m SPR32X60.ocx
New File 209608 TABCTL32.OCX
New File 167424 xceedzip.ocx
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 1 0 0 0 0
Files : 5 5 0 0 0 0
Bytes : 1.95 m 1.95 m 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 11014451 Bytes/sec.
Speed : 630.251 MegaBytes/min.
Ended : Saturday, July 4, 2020 8:53:56 AM
C:\>robocopy c:\temp\dlls e:\temp\dlls /mir /np
ROBOCOPY :: Robust File Copy for Windows
Started : Saturday, July 4, 2020 8:54:00 AM
Source : c:\temp\dlls\
Dest = e:\temp\dlls\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30
5 c:\temp\dlls\
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 5 0 5 0 0 0
Bytes : 1.95 m 0 1.95 m 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Saturday, July 4, 2020 8:54:01 AM
C:\>echo xxxxxx > c:\temp\dlls\foo.txt
C:\>robocopy c:\temp\dlls e:\temp\dlls /mir /np /l
ROBOCOPY :: Robust File Copy for Windows
Started : Saturday, July 4, 2020 8:54:32 AM
Source : c:\temp\dlls\
Dest = e:\temp\dlls\
Files : *.*
Options : *.* /L /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30
6 c:\temp\dlls\
New File 9 foo.txt
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 6 1 5 0 0 0
Bytes : 1.95 m 9 1.95 m 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Saturday, July 4, 2020 8:54:32 AM
C:\>robocopy c:\temp\dlls e:\temp\dlls /mir /np /l
ROBOCOPY :: Robust File Copy for Windows
Started : Saturday, July 4, 2020 8:54:41 AM
Source : c:\temp\dlls\
Dest = e:\temp\dlls\
Files : *.*
Options : *.* /L /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30
6 c:\temp\dlls\
New File 9 foo.txt
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 6 1 5 0 0 0
Bytes : 1.95 m 9 1.95 m 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Saturday, July 4, 2020 8:54:41 AM
C:\>
Wednesday, July 8, 2020 1:59 AM
Hi falcios,
I am writing to check if the above reply could be of help? If yes, please mark the reply as answer, if you have any other concerns or questions, please feel free to feedback.
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Friday, July 10, 2020 12:01 AM
Anne thanks for your response.
I only want to ROBOCOPY to display the files it is adding or replacing at the first pass?
Is there a switch to do that?
When I use XCOPY it just shows the files it is updating only. I'm looking for the same thing in ROBOCOPY.
Thanks in advance.
Friday, July 10, 2020 12:12 AM
I only want to ROBOCOPY to display the files it is adding or replacing at the first pass?
If the destination directory is empty, or if the files were copied with some other utility, then robocopy may view the files as being different and recopy the files.
Is it showing "new file"?
New File 163480 comdlg32.ocx
New File 179352 MSMASK32.OCX
New File 1.2 m SPR32X60.ocx
Select one small folder to test with. Run robocopy once, then run it a second time. Copy and paste the output back here so that we can see what you are seeing.
Friday, July 10, 2020 1:47 AM
I've attached 2 print screens of Robocopy, 1st pass and 2nd pass.
In both, they display each file on the screen.
Friday, July 10, 2020 2:23 AM
Thanks so much the /NDL switch seems to do the trick.