Rename long file names

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Rename long file names

Postby Bksfinest » Thu May 24, 2012 8:53 am

I read this online, I am computer illiterate so please be detailed.

open command prompt
navigate to folder with files
ren *.*.* *.*.txt
That is kind of vague.


But I can't get it to work.

Anyways, I have a major problem. I cant open the file to even rename it. I cant drag it into BRU, I can't open it in lockhunter, unlocker, anything. The file name is so long I can't even open it, click on it or check properties I get the same message. Error: "The filename or extension is too long."

I tried 2 programs RenameMaestro and BulkRenameUtility-- I am new to both programs. So far Im not able to add the files to the program.

The file name is so long for a bunch of my files I can't even transfer them to my external hd or rename them by hand.


Once I do get this sorted out. What would be the best setting if I wanted to keep the first 20 characters and last 10 but delete anything in between or delete anything in excess of 80 characters for example?
Bksfinest
 
Posts: 2
Joined: Thu May 24, 2012 8:47 am

Access files with too many FullPathName chars

Postby truth » Sat Jul 27, 2013 8:35 pm

Sounds like the file's FullPathName has exceeded your shell's max character-limit
Apps that rely on your shell's file-handler (BRU,Unlocker,etc) inherit the same problem
They simply cant use enough chars to address the entire FullPathName to your file

Since you cant spec the Full(Absolute)Path, create a RelativePath (mapped-drive substitution)
Assuming that your file's FullPathName is C:\Users\John\Deep\Deeper\LongFilename.rar

Go to your command prompt and type:
SUBST Z: C:\Users\John\Deep\Deeper
That substitutes Z: for the DirPath above, so you can access the file as Z:\LongFilename.rar

Open Explorer/MyComputer to make sure the new virtual Z: Drive appears
You should then be able to access the file as Z:\LongFilename.rar with any app
When your finished renaming/moving, remove the virtual Z: substitution with
SUBST Z: /D

Renaming long filenames (1Regex underneath)

Rename files >30chars by keeping 1st-20 & last-10 chars
(.{20})(.{1,})(.{10})$
\1\3
Rename files >80chars by keeping 1st-20 & last-10 chars
(.{20})(.{51,})(.{10})$
\1\3
Rename files >80chars by keeping 1st-80 chars
(.{80})(.+)
\1
Rename files >80chars by keeping last-80 chars
(.+)(.{80})
\2
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay


Return to BRU Support