-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
My project is taking ALL files and folders EXCEPT 2 folders from the Root of a USB stick, and stuffing them into a backup folder on the root of the USB.
For example:
Source: E:
Destination: $"E:\USB_BACKUP\{DateTime.Now.ToString("yyyy-MM-dd_hh_m_tt")};"
E:\FolderIgnore1
E:\USB_BACKUP
E:\SomeOtherFolderWithFiles
E:\SomeFile
turns into
E:\FolderIgnore1
E:\USB_BACKUP
E:\USB_BACKUP\CurrentDateTimeFolderName
E:\USB_BACKUP\CurrentDateTimeFolderName\SomeOtherFolderWithFiles
E:\USB_BACKUP\CurrentDateTimeFolderName\SomeFile
All that works, but RoboCopy reports an error that it cannot delete the source directory, which is typically done during the 'MoveFilesAndFolders'. I know WHY its erroring - It can't delete the source from the drive because the source IS the root of the drive.
Any idea how to prevent that error being generated?
Metadata
Metadata
Assignees
Labels
No labels