You are not logged in.
Pages: 1
I downloaded some ebooks with really long file names.
Q#1. Assume these files are in folder "c:\longnames". How can I tell ReNamer to truncate the filenames to just the first 100 characters?
Q#2. If the files are 'nested' deep inside a directory hierarchy (so that the total path lengths exceed 260 characters) will the suggested approach need to be modified? Can it even be accomplished?
Thanks much!
Nicholas Kormanik
Offline
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Long path problems have been a huge issue. Google search shows so many complaints.
If files are located deep within a hierarchy, unless one knows some secret, they are pretty much stuck there.
After extensive searching for solutions, the simple answer appears to be:
\\?\
Appending that to the start of the query.
I'm still trying to figure it out.
Offline
ReNamer's ability to work with long file paths was described earlier in a post #10624:
ReNamer does not support long paths (>260 characters) out of the box yet, but, nonetheless, it is possible to make it process long file paths using the "\\?\" prefix notation, as described in Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path Length Limitation.
For example, if your original long path is:
C:\Very\Long\Path
Then you need to add it to ReNamer as:
\\?\C:\Very\Long\Path
A slight difficulty is adding such long paths to ReNamer, because the standard Add Files and Add Folders dialogs cannot handle the long paths yet. However, you can use Add Paths dialog from the main menu, or Export/Import table options.
To truncate each component of the path (each folder name and the file name) to 100 characters, you could use Pascal Script or Regular Expressions rules.
These rules will achieve truncation of each path component:
1) Insert: Insert ":File_FilePath:" replacing current name (skip extension)
2) Replace: Replace all "\" with "\\" (skip extension)
3) Regular Expressions: Replace expression "(\\)([^\\]{1,100})[^\\]*(\\|\Z)" with "$1$2$3" (skip extension)
4) Replace: Replace all "\\" with "\" (skip extension)
Offline
Thank you! Well explained.
Keep moving forward....
Offline
A relevant wiki article, for future reference:
https://www.den4b.com/wiki/ReNamer:Long_paths
Offline
Pages: 1