Random Filenames for Digital Photo Frame ImagesShare
Many of the digital photo frames on the market still don’t have the ability to shuffle images and display them in random order. A couple people I know have frames and want to mix up the photo stream a little. The first time I ran into this issue I used a Windows utility called renamer to assign random names to the image files. But what about a pure Mac solution?
There is one, and you don’t need anything other than OS X to get it done. Skip to the screencast if you prefer – otherwise here’s what you do:
Place the files to be renamed in one folder. It’s best to have them all in one folder without subfolders. If you have images scattered inside subdirectories you’ll have to make some adjustments to these instructions. USE A COPY OF YOUR ORIGINAL IMAGE FILES, there’s no reason not to.
Open the Terminal from your Utilities folder in Applications. Type cd followed by a space. Then drag the folder containing the files from Finder to the Terminal window. Hit return. The Terminal prompt should update to indicate you’re now in the directory containing the images. This folder should NOT BE THE SAME AS THE ONE YOUR ORIGINALS RESIDE IN. Sorry for that, but it’s important.
Finally, type the following command in the Terminal:
for i in *.jpg; do mv $i $RANDOM.jpg; done
The command is case-sensitive. If your images have names ending .JPG you’ll need to adjust the *.jpg part of the command above to use a capital JPG.
Hit return and your image files are renamed using random numbers. Copy them to the digital photo frame and your images should cycle randomly. Thanks to this thread at Mac Rumors Forums.
I’ve included a screencast for those not familiar with Terminal. Be careful in the Terminal. You can delete files accidentally and they won’t be in your Trash ! See this warning for more information.Screencast | Permalink