Need to reorganize pictures in folders named by date [closed]
Recently I had a similar need.
Specifically I wanted to move and rename files based on date the picture was taken, as follows:
E:\Pictures\DSC_001.jpg
to E:\Pictures\2009\2009-04-23\2009-04-23-14h56m28.jpg
E:\Pictures\DSC_002.jpg
to E:\Pictures\2009\2009-04-23\2009-04-23-15h32m14.jpg
E:\Pictures\DSC_003.jpg
to E:\Pictures\2010\2010-02-22\2020-02-22-14h56m28.jpg
The motives for me for this structure:
- I had 6000 files in the E:\Pictures folder. Even though I had used Namexif to rename all of them into YYYY-MM-DD-HHhMMmSS.jpg format, I would have still had 800+ subfolders under Pictures, had I not used year folders.
- Had I used 2009/12/31/2009-12-31-23h59m59s.jpg format, it would have been tedious to surf around folders (on some months I have taken pictures only on few days)
- The 2009-12/2009-12-31-23h59m59s.jpg format would have still produced too many subfolders to E:\Pictures folder and also to 2009-12 and other more popular months (all the many pictures taken on 24th and 31th of Dec would all be listed directly under 2009-12 folder).
YMMV.
After spending an hour trying out various graphical UI based programs, eventually what got the job done exactly how I needed, was ExifTool.
Here are the steps:
- Download ExifTool.
- Install it:
- If you're on Windows, you should:
- unzip the zip file,
- rename exiftool(-k).exe to exiftool.exe
- move exiftool to some folder in your PATH (I use C:\Windows folder) so that it is usable in every folder you're currently in (I use C:\Windows).
- If you're on Mac, just install the app.
- If you're on Windows, you should:
- Open your terminal:
- In Windows, press WinR and type cmdEnter,
- On Mac, press cmdspace and type term↩
- Navigate to the folder where your pictures are. On Mac you would type something like
cd /Volumes/MyUSBDrive/Pictures
. In Windows you would typeE:
Entercd Pictures
. Use your own folder path here, of course. - Now launch exiftool and let it do its job:
exiftool -d %Y/%Y-%m-%d/%Y-%m-%d-%Hh%Mm%S.%%e "-filename<datetimeoriginal" .
(the dot at the end refers to current directory)
Basically you're telling exiftool to read date taken (datetimeoriginal) information from within the picture file and use that information to rename the file, using YYYY/YYYY-mm-dd/YYYY-mm-dd-HHhMMmSS.ext format. Notice that there are slashes in the file format we specify -- this causes the file to be moved into respective folder structure, which is created on the fly.
You can move and/or rename files any way you like with this utility. If your requirements differ from mine, just refer to this page which contain nice examples from where I derived the command line I eventually used.
Came across this question searching for a solution to the exact same issue.
I found two programs to accomplish this:
- Photo Move 2
There is a free version and a paid version. The free version only allows for a Year/Month/Day folder structure. The paid version allows for more folder options and some additional file types and handling options.
- Photos2Folders
This is a free utility to move or copy photos from one folder structure to another. A few less options than the paid version of Photo Move but it does allow to specify up to 4 levels of folder structure.
You can use ReNamer with some rules.