Not my expertise in the least but I found this very interesting. Some research later I found the following, whether it will solve your issue completely, I am not sure but it might point you in the right direction.
First of all, a warning from most articles and posts -
Quote:
Before performing any mass-renaming operations, make sure you have a backup of the data to avoid accidental data loss.
Some 3rd party tools I found that seesm to work with long file names etc -
1)
Long Path Tool[
^]
Quote:
The most user-friendly long path files problem fixer for Windows and Mac. Delete, copy, bulk rename long path files.
2)
Total Commander[
^]
Quote:
Total Commander is a file manager replacement that offers multiple language support, search, file comparison, directory synchronization, quick view panel with bitmap display, ZIP, ARJ, LZH, RAR, UC2, TAR, GZ, CAB, ACE archive handling plus plugins, built-in FTP client with FXP, HTTP proxy support, and more.
3)
FastCopy[
^]
Quote:
FastCopy is the Fastest Copy/Backup Software on Windows
It supports UNICODE and over MAX_PATH (260 characters) file pathnames.
Because it uses multi-threads for Read/Write/Verify, Overlapped I/O, Direct I/O, so it brings out the best speed of devices.
It supports Include/Exclude filter like a UNIX wildcard.
It runs fast and does not hog resources, because MFC is not used.
Use the 'subst' command which allows you to create a virtual drive letter that points to a specific folder path. By doing this, you can access the problematic folder with a shorter path to make handling it much easier -
MS Learn | subst command[
^]
In your cmd, run -
subst X: "C:\very\long\path\to\your\problematic\folder"
I see you used Robocopy already, try and use the 'robocopy' command with the '/MT' (MultiThreading) option -
Robocopy command description[
^]
Quote:
The most important switch to focus on in the above command is /MT, which is the switch that enables Robocopy to copy files in multi-threaded mode. If you do not set a number next to the /MT switch, the default number will be 8, which means that Robocopy will try to copy eight files simultaneously.
Your command will be -
robocopy "source_path" "destination_path" /E /MOVE /MT:8
You can also use 'PowerShell' commands with the 'Get-ChildItem', 'Rename-Item' cmdlets to traverse the folder structure and rename the files/folders as it has better support for Unicode characters and long paths compared to VBScript -
MS Learn | Get-ChildItem[
^]
Get-ChildItem -Path "C:\very\long\path\to\your\problematic\folder" -Recurse | ForEach-Object {
$newName = $_.Name -replace 'old_pattern', 'new_pattern'
$_ | Rename-Item -NewName $newName
}
I hope some of these work for you.