Automator doesn't have nearly the amount of options that Name Mangler does, and Renamer4Mac isn't free and also doesn't do as good a job.
What's the difference between having them be "random" and renaming them in order (yes, I know the definition of random vs. ordered, but why is it important in your case)? Try Automator- I can't tell how the "Get Finder Items" sorts the files.
This is a common requirement, its for a photo frame.
I haven't used automator but looking at it on the Apple web site it doesn't seem to have a randomise ability because its only doing things you would do manually.
#!/bin/bash
# Get all jpg files
files = $(ls *.jpg)
# Loop through files
for file in $files
do
# assign random name
mv $file $RANDOM.jpg
done
chmod u+x image_rename_random
./image_rename_random
Ah.
Here's a screen shot of what I see when I drag a bunch of pictures into Automator. Does it look like they're in any sort of order to you?
Hey, I'm not sure if this would work but have you tried using automator to sort them into one long list. Then getting it to get all the files ending in 1 and renaming those 1-100 (or however many ther are), then get all the files with a 2 at the end and rename those 101-200 (or however many there are) and repeating all the way up to 0?
This would produce a semi random list, but could be repeatd to make it more random.
I think to do this you could use:
1. get finder items
2. rename finder items and end in consecutive numbers
3. find finder items and navigate to the file, select name ending in (one in this case)
4. rename finder itesm
5. repeat steps 3 and 4 until you've chosen the end number to be everything from 2 through 0.
Just a thought.
You could rename with random by using a bash script. I'm not at a Mac (or Linux) to try it though so be sure to test it on a test directory of images.
Just copy and paste the above into a text file and give it a name such as "image_rename_random" and it doesn't need an extension. Save the file inside the image directory you're wanting to effect. Open Terminal, use the cd command to go to the directory where you saved the script. You may need to give the script execution permissions first that is easily done with the following command.Code:#!/bin/bash # Get all jpg files files = $(ls *.jpg) # Loop through files for file in $files do # assign random name mv $file $RANDOM.jpg done
Then simply enter in,Code:chmod u+x image_rename_random
and it'll run the script hopefully. The random here should work up to about 32,000. Something similar to this is likely possible with AppleScript as well.Code:./image_rename_random
I believe, if memory serves, that it use to be free, but has since been enhanced and deemed worthy a price tag. I think I use to use it when it was free as well, but now use Name Mangler in its place.renamer4mac isn't free?
That was something I wanted to test. The documentation I read for $RANDOM said it would give a different number for each instantiation, but I don't know how reliable that may be.Thanks, someone published something very similar to that in another thread and I was looking at modifying it so it would pick all the files out of a a series of nested folders (the script I had didn't do that) and also (presumably) check to see if that random name exists first in case of a duplicate. Or is that unlikely enough not to worry about? ... If I have say 2,000-3,000 names I think the odds are quite high there will be a duplicate - probably close to a certainty I'd guess.