adapted from https://learn-powershell.net/2013/04/01/list-all-files-regardless-of-260-character-path-restriction-using-powershell-and-robocopy/ note: (some versions of?) robocopy appear to have a bug where the local time zone is used with the wrong sign, causing it to log timestamps that are out by 2*abs(your locale's difference from UTC). e.g. for Pacific Standard Time, robocopy's timestamps are 2*abs(-8) = 16 hours off. list all paths (including folders & empty folders), but no timestamps (because of a bug/inconsistency, robocopy only prints timestamps for files, not folders): robocopy .\targetdir NULL /L /E /NJH /BYTES /FP /XJ /R:0 /W:0 list only files, and include timestamps: robocopy .\targetdir NULL /L /S /NJH /BYTES /FP /NC /NDL /XJ /TS /R:0 /W:0 Explanation of switches: /L :: List only - don't copy, timestamp or delete any files. /S :: copy Subdirectories, but not empty ones. /NJH :: No Job Header. /BYTES :: Print sizes as bytes. /FP :: include Full Pathname of files in the output. /NC :: No Class - don't log file classes. /NDL :: No Directory List - don't log directory names. /TS :: include source file Time Stamps in the output. /R:n :: number of Retries on failed copies /W:n :: Wait time between retries: default is 30 seconds. /XJ :: eXclude Junction points. (normally included by default; note: due to severe bugs, robocopy does not support junction points).