[mdlug] batch name changes

Michael Mikowski z_mikowski at yahoo.com
Thu Jan 24 14:48:36 EST 2013


Hi Gary:

Also, if you need to rename all files and know the extension you want, it is a one-liner (and this should be quite efficient):

find ./ -type d |while read dir; do rename 's/$/.jpg/' $(find $dir -type f -maxdepth 1); done


Cheers, Mike



________________________________
 From: Mike On Mobile <z_mikowski at yahoo.com>
To: MDLUG's Main discussion list <mdlug at mdlug.org> 
Sent: Thursday, January 24, 2013 9:46 AM
Subject: Re: [mdlug] batch name changes
 
Hi Gary:

This should be easy. Simply use the file utility in a shell script.  If you need more information there are various utilities like those from image magic as well as EXIF libraries.  If you could send me a sample of files and the output you are looking for, I feel pretty confident that I could cook up a shell script in a few minutes. 

cheers, Mike

Garry Stahl <tesral at wowway.com> wrote:

>I have a lot of old amiga /iff image files.  converting is easy, howvwer....
>
>Amiga didn't use the extension to identify file types.  Ergo the image 
>files have no extensions.  I need to add them.  Without doing them on at 
>a time (to some 5000 files) or changingthe rest of the name.
>
>Suggestions please.  Outside of hooking up the Amiga.  It can do that 
>easily.  Directory Opus was Ghodd.
>
>-- 
>Garry  AKA  --Phoenix--  Rising above the Flames.
>
>I have as much authority as the Pope, I just don't have as many people who believe it.
>Star Trek mort. Viva la Star Trek admiraetur
>The Olde Phoenix Inn http://phoenixinn.iwarp.com
>Metro Detroit Linux Users Group http://www.mdlug.org
>
>_______________________________________________
>mdlug mailing list
>mdlug at mdlug.org
>http://mdlug.org/mailman/listinfo/mdlug
_______________________________________________
mdlug mailing list
mdlug at mdlug.org
http://mdlug.org/mailman/listinfo/mdlug


More information about the mdlug mailing list