HowTo rename many files *.jpg to new ?

Joined
Jun 26, 2007
Messages
3
Reaction score
0
Points
1
I have a folder with thousands of random image file names like:

102.jpg, or 01.jpg or 83.jpg or something.jpg

some are also *.gif

How to select them all and rename the files to something with an automatic renaming scheme say, starting with:

01.jpg
02.jpg
and so on....

I just started to read about AppleScript, so I am totally new to it and don't have the skill to do something like that, can anyone have ideas ? how to do this ?
 
Joined
May 27, 2005
Messages
975
Reaction score
61
Points
28
Location
Oklahoma City, OK
Your Mac's Specs
17" MacBook Pro, 8GB iPhone
First, welcome to the forums.

Second, what you want to do can easily done with a program called automator, this program is already on your computer. Use spotlight or look in the applications folder to find it.

When you open automator, on the left is the library and that is all the actions you can perform. The applications folder should be expanded, if not then expand it. Then in the list of applications, select Finder then in the column just to the right will show the actions you can perform.

In the actions column select, "Get Specified Finder Items", then drag this action to the big column on the far left and it should add the action. The second action you need to find is the one called, "Rename Finder Items" and drag that under the far right action. It should have added an extra action called, "Copy Finder Items", this is good.


Ok now what you want to do is click the + on the very first action at the top, and you want to navigate to the folder with your pictures select all the pictures and hit open to add them to the window. Then you want to make a folder somewhere on your computer so when automator copies the images, it has a place to put them.

Then in the second action click the drop down menu and select "other" and navigate to the folder you just created, then click open to select that folder. Finally you are to the point where you decide what to name the files. Click the drop down menu and select, "Make Sequential" Then check the box that says "New Name", and you have to give the files a name. The rest is pretty self explanatory, when youre ready to run the workflow, click the play button at the top right.


Sorry this is a lot of text, but automator is a little odd at first and I thought a total walkthrough might help more than just saying, "use automator."
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
First, welcome to the forums.

Second, what you want to do can easily done with a program called automator, this program is already on your computer. Use spotlight or look in the applications folder to find it.

When you open automator, on the left is the library and that is all the actions you can perform. The applications folder should be expanded, if not then expand it. Then in the list of applications, select Finder then in the column just to the right will show the actions you can perform.

In the actions column select, "Get Specified Finder Items", then drag this action to the big column on the far left and it should add the action. The second action you need to find is the one called, "Rename Finder Items" and drag that under the far right action. It should have added an extra action called, "Copy Finder Items", this is good.


Ok now what you want to do is click the + on the very first action at the top, and you want to navigate to the folder with your pictures select all the pictures and hit open to add them to the window. Then you want to make a folder somewhere on your computer so when automator copies the images, it has a place to put them.

Then in the second action click the drop down menu and select "other" and navigate to the folder you just created, then click open to select that folder. Finally you are to the point where you decide what to name the files. Click the drop down menu and select, "Make Sequential" Then check the box that says "New Name", and you have to give the files a name. The rest is pretty self explanatory, when youre ready to run the workflow, click the play button at the top right.


Sorry this is a lot of text, but automator is a little odd at first and I thought a total walkthrough might help more than just saying, "use automator."

That's an excellent post PunkRockTuba!

I followed your method to the letter but it didn't work initially. When I selected the second action, a window popped up asking me if I wanted to copy the files instead just incase something went wrong. The first time I said OK to that and the whole script failed. The second time I said No to it and therefore I didn't have the option to create a new folder for the copies to be stored. That meant I only had two scripts in the far right window instead of three. The Automator script was totally successful this time!

I had a folder full of .avi's, mpeg's, jpeg's with totally random names and I was able to successfully rename the lot to a new name with sequential number added too!

I have only had a passing look at Automator and it's great to know that it can handle the renaming of random files with ease. Thanks for that walk-through!


 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
Thanks, hopefully it will come in handy in a search.

I must say I was impressed that Automator could handle the batch renaming of such a confused collection of different file names and file types that I threw at it.

This question of how do I rename in batch does come up a lot and the main answer even I gave involved either the pre-installed AppleScript method OR a 3rd Party Software app like A Better Finder Rename.

Both those options always want to know which text you want to change and when you have a missmatch of file names, it's been near impossible to fully change them just as you'd like.

Automator, on the other hand, doesn't need to know the text you want changed which is a blessing.

If you hadn't spelt it out so concisely I wouldn't have discovered how great Automator is as I just don't have the concentration to sit down with it to learn how to unleash it's power ....:)
 
OP
R
Joined
Jun 26, 2007
Messages
3
Reaction score
0
Points
1
Thanks for the help as well! The Automator didn't work for me, it's not doing as described, maybe the way they are in order is wrong ?

From top to bottom what is the exact order of the automator actions ?

Thanks!
 
OP
R
Joined
Jun 26, 2007
Messages
3
Reaction score
0
Points
1
Ahhhh it worked, the order of the Automator Actions was incorrect and also when I was selecting the original pics, I selected the folder, thinking it would look inside, but one has to select all the pictures within the folder.

I do this by selecting the picture from the top, holding down the shift, scrolling all the way down to the last pic and press the mouse button, it selects them all for me.

The order that I have is from top to bottom.

1. Get Specified Fider Items (to located pics first) - select the individual files, using folder don't seem to work
2. Rename the Files Items (to rename the files)
3. Copy Finder Items (copy new files into new location)

Works like a charm, I am going to have to read a book to learn more about this Automator, it's the coolest thing since sliced cheese, thanks!
 
Joined
May 27, 2005
Messages
975
Reaction score
61
Points
28
Location
Oklahoma City, OK
Your Mac's Specs
17" MacBook Pro, 8GB iPhone
Yea automator is a nice program once you can figure out how to use it, I really like it for making thumbnails of images for websites.

The order I had stuff for your question RompStar was:

Get Specified Finder Items
Copy Finder Items
Rename Finder Items

but obviously either order works, I just liked it to copy the files first so if anything messes up you dont harm the original files.
 

eric


Retired Staff
Joined
Nov 4, 2006
Messages
8,704
Reaction score
447
Points
83
Location
twin cities, mn, usa
automator definitely has issues with ordering files, even if they are all named something like:

image001.jpg
image002.jpg
image003.jpg

i'd tried everything i could think of to make it keep a particular order and nothing seems to work.


renamer4mac keeps the original order every time. it's so important to me, i didn't even bother putting it in the dock... it's right on my finder toolbar.
 
Joined
Jul 18, 2012
Messages
1
Reaction score
0
Points
1
Thanks !

Awesome post. Helped a lot. Thanks

First, welcome to the forums.

Second, what you want to do can easily done with a program called automator, this program is already on your computer. Use spotlight or look in the applications folder to find it.

When you open automator, on the left is the library and that is all the actions you can perform. The applications folder should be expanded, if not then expand it. Then in the list of applications, select Finder then in the column just to the right will show the actions you can perform.

In the actions column select, "Get Specified Finder Items", then drag this action to the big column on the far left and it should add the action. The second action you need to find is the one called, "Rename Finder Items" and drag that under the far right action. It should have added an extra action called, "Copy Finder Items", this is good.


Ok now what you want to do is click the + on the very first action at the top, and you want to navigate to the folder with your pictures select all the pictures and hit open to add them to the window. Then you want to make a folder somewhere on your computer so when automator copies the images, it has a place to put them.

Then in the second action click the drop down menu and select "other" and navigate to the folder you just created, then click open to select that folder. Finally you are to the point where you decide what to name the files. Click the drop down menu and select, "Make Sequential" Then check the box that says "New Name", and you have to give the files a name. The rest is pretty self explanatory, when youre ready to run the workflow, click the play button at the top right.


Sorry this is a lot of text, but automator is a little odd at first and I thought a total walkthrough might help more than just saying, "use automator."
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top