Recently I had to sort some pictures before taking them to the print shop to be printed, so I decided why not mess around and hopefully learn something new in the process :D
The event in question was a wedding and I had to make multiple copies of each photo since the same photo would be going to different people.
I wanted to properly sort the pictures in order to make it easier for both the person who will be doing the printing and my self later on when I would have to sort who gets which photographs.
My wife is a photographer and she used to work in shops which printed photographs, so I asked her what is the best way to give the print shop the number of copies I needed from each photo. She recommended the following format because each picture’s name shows up on the machine which does the printing
I created a folder for each person who would receive the photos, after that, I went through the album and just copied each person to that respective person’s folder.
Something like so
Then I copied everything to a different folder where I kept just one image which I will print.
Now I just needed to count the number of copies I wanted for each image, nothing that a few pipes can’t solve
But that whitespace won’t do in our image name, I mean it technically doesn’t make a difference but I wanted to remove it.
Always avoid whitespace when you can :D
Keep in mind that there were a lot more photos then this and I have truncated the output to make it more readable.
The below command renames each photo it finds and adds the number of copies followed by a
_ and the photo number, effectively replacing the whitespace
ls shows that the files were successfully renamed :3
This is just one example out of many, I try and use Linux to play around whenever I can, you should too if you aren’t already :)
Got a better solution? Amazing! That is the beauty of Linux, there are multiple solutions to the same problem ^^