Page 1 of 1
How to just rename each image in a folder
Posted: 2013-08-29T13:20:31-07:00
by acoustic7
I have a folder full of png images that's file names are too long for a program that I'm feeding them to. Ideally, I'd like to rename every image in the folder to be just characters 59-68 of it's current filename. If that's not possible then I'd like to rename it to characters 59-73 (59-the end) of it's current filename. if that's also not possible then I'm fine to make them all just integered. i.e file0001, file0002, file0003 etc.
Could imagemagick do any of this? I've found a bunch of stuff about resizing and renaming, but nothing just about renaming.
Thanks for the help!
Re: How to just rename each image in a folder
Posted: 2013-08-29T13:52:34-07:00
by snibgo
ImageMagick reads images and writes them. It would be highly inefficient to do this when you just want to rename them.
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:00:37-07:00
by acoustic7
Valid point, and I know, but I'm not sure of any other way. It's going to be more efficient than clicking and deleting the image filename by hand. If you have any idea how to do this in command prompt or anything, it'd be appreciated.
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:07:28-07:00
by snibgo
It's a scripting problem, using whatever command your shell uses to rename files. The hardest part is probably inventing the new names, ensuring they don't already exist. Quite simple in Windows, as files also have 8.3 names (at least, up to Windows 7; I don't know about Windows 8 ).
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:10:38-07:00
by fmw42
What platform are you using? Linux, Mac, Windows?
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:13:33-07:00
by acoustic7
I'm running Windows 7
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:18:59-07:00
by acoustic7
Just found this, might work! Thanks for the help anyway guys.
http://www.howtogeek.com/111859/how-to- ... ple-files/
Re: How to just rename each image in a folder
Posted: 2013-08-29T14:56:34-07:00
by GreenKoopa
IM isn't the right tool for this, but file renaming is a crowded category so you have endless options. Many tools will let you include image properties and metadata in your filenames. Some will let you create hard or soft links, which may be useful if you have just one progrm/step that requires the rename. Here is one list of Windows options.
http://www.techsupportalert.com/best-fr ... tility.htm
Alternatively, any scripting language can do this.
I use Flexible Renamer and Perl. Both are portable and support regular expressions, but neither is anything special.
Re: How to just rename each image in a folder
Posted: 2013-09-29T23:52:49-07:00
by anthony
I have perl scripts "mv_renum" and "mv_perl" which allows you to rename or renumber files in particular ways
They are available in my personal software export.
http://www.ict.griffith.edu.au/anthony/ ... /#mv_renum