It's just that these types of posts are frequently (DARN-NEAR-ALWAYS!!!) misunderstood and there's more time spent getting across exactly what the trouble is when assumptions are made about the problem. This is lengthy and I apologize for that. It is a WD My Cloud EX4100, no info on the precise OS, but I'm sure it's some open-source stuff pilfered by WD for re-sale >:-( I Digress.
There are two other users whose files are targeted by this same code and they never have any troubles. This is a Linux-based NAS that you may want to point to as the source of the trouble, but (and this MAY be key here) it's only happening with the remote user. I can delete the folder in any myriad of ways, from right-click > Delete, to dragging it to the recycle bin, to pressing the delete key.permissions is not the trouble. Not all filenames include the 'safe' special characters, so even that's covered. H:\FolderName Temp01\P3KBJB5\Local\Jobs\MMoA-01\Pages\A4G8OSC - The system cannot find the path specified. RETURNS: H:\FolderName Temp01\P3KBJB5\Local\Jobs\MMoA-01\Pages\26WEX34 - The system cannot find the path specified. There are no special characters in any of the filenames, except those that generally don't cause trouble (like "+", "-", "_" - less the quotes). RMDIR: The pseudo-command below is what's being run: rmdir /S /Q H:\FolderName Temp01.
The overall lengths of the filenames (without the shortnames) never exceeds 200 chars, Even if I substitute the full path instead of the drive letter. These are the short names for their respective folders H:\FolderName Temp01\PlanSwift\Local\Jobs\MMoA-01\Pages\A0.01 DRAWING INDEXįILENAMES: If you notice, there are tildes in the sub-foldernames. H:\FolderName Temp01\PlanSwift\Local\Jobs\MMoA-01\Pages\A0.00 COVER SHEET H:\FolderName Temp01\PlanSwift\Local\Jobs\MMoA-01\Pages\ METAL PAN H:\FolderName Temp01\P3KBJB~5\Local\Jobs\MMoA-01\Pages\A06RBP~V - The system cannot find the path specified. H:\FolderName Temp01\P3KBJB~5\Local\Jobs\MMoA-01\Pages\A4G8OS~C - The system cannot find the path specified. H:\FolderName Temp01\P3KBJB~5\Local\Jobs\MMoA-01\Pages\26WEX3~4 - The system cannot find the path specified. RMDIR: The pseudo-command below is what's being run: (EDIT: H: was coming up as an emoji since I had the following "\") But, it's the Drive Letter (H: mapped to "\\\\" Originally, I mapped drives to the source and target folders so I worry less on whose computer it's running, meaning the mapping is a hold-over from the original code, partially in place to reduce the characters needed to reference the filename(s). I run the deletions on a machine local to the NAS which speeds it up tremendously.) (Part of the trouble here is that the user is remote and the delete process can run 12+ hours, so they frequently ended up interrupting the deletion process, so I needed to get the copy done first, then worry about deletions.
Later that night, there's a second process which comes in and looks for folders named and deletes them. I have a scheduled task running some VBScript running a snapshot backup process.Two scripts run: 1) Renames the first on the to an even longer name in order to get it out of the way so it can copy the backup files to a new folder named. If you don't want the background, please skip to the 'rmdir' portion below: