I'm trying to stop robocopy from creating empty folders when it is copying. The SOURCE folders are not empty; but they also have no new files to copy. Yet robocopy creates them at the destination.
My goal is to create a copy of files 1 day old. But I'd like to avoid seeing 11,674 new folders and entries in the log when only 4 files were copied... and not plug up the disk with another 12k files every day I do an incremental backup of only 4 to 50 files.
I know fairly well how robocopy works ... and I am pretty sure this would be considered a 'feature' by most design teams rather than a 'defect', so asking MS to look into it is mostly pointless.
A workaround is to use XCOPY as follows, but it requires calculating and formatting a legal date:
E:\>xcopy C:\Users\Public\* E:\C_Users\Public\ /D:6-1-2018 /S /B /C /H /J /K /O /Y
Any ideas or suggestions?
Here's an example of the problem, note the created Adobe AppData hierarchy is all empty:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Fri Jun 01 03:42:50 2018
Source : C:\Users\Public\
Dest : E:\20180601_Users_C\Public\
Files : *.*
Options : *.* /S /COPY:DATSO /B /NP /XJ /REG /MAXAGE:1 /MT:16 /R:3 /W:1
New Dir 2 C:\Users\Public\.idlerc\
New Dir 0 C:\Users\Public\AppData\
New Dir 4 C:\Users\Public\AppData\Local\
New File 7603 Resmon.ResmonCfg 100%
New Dir 0 C:\Users\Public\AppData\Local\Adobe\
New Dir 0 C:\Users\Public\AppData\Local\Adobe\AAMUpdater\
New Dir 7 C:\Users\Public\AppData\Local\Adobe\AAMUpdater\1.0\
New Dir 1 C:\Users\Public\AppData\Local\Adobe\AAMUpdater\1.0\Data\
[...snip...]
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 11674 11674 0 0 0 0
Files : 443686 4 443682 0 0 0
Bytes : 1.789 t 53.26 m 1.789 t 0 0 0
Times : 0:00:40 0:00:09 0:00:00 0:00:05
Ended : Fri Jun 01 03:43:09 2018
===========