Toggle navigation
All Forums
Recent Posts
Sign In
Prefix file names?
jon-e-orange
Posted:
May 10, 2004 10:44AM
in
Genius Bar
edited January 2014
Hi guys and gals
I have loads of photo files I need to prefix, ie pic_001.jpg needs to be D1_pic_oo1.jpg.
Is there an easy way to do this under mac X or via the CLI?
Cheers
J-E-O
Comments
Reply 1 of 3
stroszek
Posts:
801
member
May 10, 2004 11:40AM
A Better Finder Rename
It's the most useful shareware I've ever bought.
Reply 2 of 3
karl kuehn
Posts:
756
member
May 10, 2004 11:58AM
Here is one command line route:
Code:
ls *.jpg | awk '{print ("mv \\"" $1 "\\" \\"D1" $1"\\"")}'
Play arround with that some untill it looks exactly like you want it to (basically this creates a whole lot of mv comands), and then append:
Code:
| /bin/sh
to it.
This is all off of ideas first taken from
MacOSXHints
.
Reply 3 of 3
jon-e-orange
Posts:
104
member
May 12, 2004 5:15AM
Done it! - thanks karl it all worked fine.
I have also found that if you install the scripts menu you can do the same form there.
Cheers
J-E-O
Sign In
or
Register
to comment.
Comments
It's the most useful shareware I've ever bought.
ls *.jpg | awk '{print ("mv \\"" $1 "\\" \\"D1" $1"\\"")}'
Play arround with that some untill it looks exactly like you want it to (basically this creates a whole lot of mv comands), and then append:
| /bin/sh
to it.
This is all off of ideas first taken from MacOSXHints.
I have also found that if you install the scripts menu you can do the same form there.
Cheers
J-E-O