Register
It is currently Thu Apr 24, 2014 7:35 pm

change extension recursively


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Mon May 17, 2010 12:11 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
Hi everyone

I want to rename in mass
a bunch of pdfs to swf in
a given directory recursively, as there
are many contained within different
directories.

Ted.


Top
 Profile  
 PostPosted: Mon May 17, 2010 6:37 pm   
User avatar

Joined: Tue Apr 27, 2010 2:28 pm
Posts: 172
Location: Czech Republic
If your directory and file names do not contain spaces, you can just try this one:
Code:
find my-dir -name '*.pdf' | while read file ; do mv $file ${file%.pdf}.swf ; done


Top
 Profile  
 PostPosted: Tue May 18, 2010 2:32 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
Thanks man.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP