![bulk photo renamer mac bulk photo renamer mac](https://wemactanks.com/wp-content/uploads/2016/10/25-HeatCoils.jpg)
Please note that the file names also contain the full path to that file. For example: os.rename("Desktop/photos/photo1.jpg", "Desktop/photos/London-Jan2020-AG-1.jpg") The function that does the renaming is os.rename() which takes an input of the old file name and the new file name. Notice also that we create an iterator (i) to enumerate our photos to make sure that every photo is names differently. The next step is create a loop to run through all the files in the given directory with os.listdir(), where the the function parameter is a string to the relevant directory. directory = str(input("Please enter the directory of your photos")) This gives us all the necessary information to put together an informative file name that is robust against dates and photographers.
![bulk photo renamer mac bulk photo renamer mac](https://www.macsoftdownload.com/wp-content/uploads/2019/01/Renamer.png)
Desktop/photos), the location where the photos were taken, the date that the photos were taken, and their initials. Next, we will prompt the user for input of the directory in which their images are stored (ex. We start by importing the os module, defining our main function, and showing the user some instructions on using the file. Location = input("Please enter the location where these photos were taken.")ĭate = input("Please enter the date when these photos were taken.")Ĭredit = input("What are the initials of the photographer?") "you have filled out a response, press ENTER to submit it.")ĭirectory = str(input("Please enter the directory of your photos")) The only required question is the first one. "wish not to fill it out, just press ENTER without leaving a " Print("Please follow the instructions below. # ask user for some info about photos on run. London-Jan2020-AG-1.jpg) Building Your Re-Namerīelow is the completed code, you can have a look at it as an overview before we go through the major sections: import os The goal is to write a function that takes a directory of photos as input and renames them all with the following naming scheme: Location-Date-PhotographerInitials-Enumeration.jpg (ex.
#Bulk photo renamer mac install
You can install Python 3 here if you need to. This script is written in Python 3, and the only module that you’ll need is the os module, which already comes standard with Python. In this article, we will go through the process of writing such a script, should you want your own, but you can find the completed function here:, ready to use out of the box. So, with the help of a short python script, you can rename whole swaths of photos at once per a specific and informative naming scheme at the push of a button. Renaming photos individually is very time consuming - not to mention incredibly boring! Photos taken during a trip can take you back to some of your most cherished memories, but it’s an endless battle to keep them all organized, so that future you doesn’t have to sift through a formless blob of indecipherably numbered jpg files just to find the right one.