79555593

Date: 2025-04-04 14:36:32
Score: 0.5
Natty:
Report link

The /MOV flag MOVES files (which is equivalent to: copy + delete original)

Replace:

robocopy $srcPath $destPath $fileFilter /MOV /E

with

robocopy $srcPath $destPath $fileFilter  /E

If the Z: drive location is a network location consider adding
/Z
Which allows for copying the content in restartable mode

If the copy is intended to be a backup of the original location you might consider adding
/COPYALL
Which will copy all file attributes, timestamps and security descriptors to ensure that, upon restore, all of the pre-existing attributes and security are already in place.

There are a number of other helpful options that you might consider based on your specific use case and you can review them by using robocopy /? on the command line.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ben