Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

How to shorten a lot of long filenames

Is there any way to shorten file names in a folder using a program or batch file.  We have these dumb long file names that need to be fixed because we can't zip files due to long filenames.

Thanks
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Anything that is automated will be rather dumb .. how many characters do you want to keep?
ASKER CERTIFIED SOLUTION
Avatar of nobus
nobus
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Al,

First, let me say as a born-and-bred Philadelphian that Naperville now has a Philly Soft Pretzel Factory (1037 West Ogden Ave)...these are the real deal! I make the 100-mile round-trip from Olympia Fields frequently to get my fix. :)

Now, to your question...here's an idea. For each file, retrieve the short (8.3) file name. Use that to zip the files. Also, create a simple, plain text file that contains a mapping of the short file names to the long file names. Then when you unpack the zip file, use the mapping file to rename all files to their long names...should not be very difficult to write a program to do that. Regards, Joe
Avatar of al4629740

ASKER

I think at this point, I'm more interested in trying the pretzel factory than answering the question.  I've seen it all the time but haven't gone in so I'll try to do that in the next few days!  

I like the file renamer that nobus suggested.  I might try that first and see if that suffices.
I'm getting low on my stash in the freezer, so I may see you up there...they heat up nicely in the oven at 350° for 15 mins...but you need to freeze them immediately...of course, if I lived in Naperville, I'd simply get them fresh every day. Oh, and don't forget the Philly mustard...plain yellow is the only type that a real Philadelphian would use.
Oh man, you got me going.  I can't wait to try it.