[mdlug] batch name changes

Garry Stahl tesral at wowway.com
Mon Jan 28 14:11:41 EST 2013


On 01/25/2013 08:24 AM, Mike Mikowski wrote:
> Hi Gary:
>
> 1. #Open up a terminal
> 2. cd <directory with files>
> 3. pwd # to ensure you are in the right directory
> 4. # copy and paste
>   find ./ -type d |while read dir; do rename 's/$/.jpg/' $(find $dir -type f -maxdepth 1); done
> 5. # bask in success
>

A few clarifications if you will.

find ./ -type

Is there anything I need to change in that?  The files in question have 
no extensions at all.  That seems to be the main issue for every GUI 
program I have tried to use.  It was a particularity of the Amiga that 
it read the file headers, extensions were unneeded and could frankly be 
wrong.  It didn't matter.

's/$/.jpg'

I can change that to any extension I desire?

-- 
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



More information about the mdlug mailing list