Author Topic: Renaming JPGs in a specific folder and directory  (Read 289 times)

okeetd

  • Jr. Member
  • **
  • Posts: 13
Renaming JPGs in a specific folder and directory
« on: September 28, 2019, 08:16:09 PM »
Hello - I recently used exiftool to rename MOV using the date and it worked great.  Stargeek really helped me out and gave me the right commands. 

Now I am trying to do my JPGs and simple adjustments I hoped would work are not. Hoping someone can help.

I would like the commands for two options.  One to rename a specific folder.  The second is the same command but to do it for a folder AND all subfolders.

I am trying to rename all files to the date MM-DD-YYYY HHhMMmSSs based on the Date Taken field.  The files are located in the following folder... G:\Import Folder\TRIAL RENAME\Main\1

I would also like to have the command to do it for all folders and subfolders once I get the hang of it with some practice.... IE  G:\Import Folder\TRIAL RENAME\Main

Any help would be appreciated. 

Thanks

Tom

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Renaming JPGs in a specific folder and directory
« Reply #1 on: September 28, 2019, 08:24:23 PM »
Hi Tom,

In your last thread, you were using this command:

exiftool -ext mts "-FileName<DateTimeOriginal" -d "%Y%m%d_%H%M%S.%%e" "G:\Import Folder\TEST MTS"

But the date format you specify now would be more like this:

exiftool -ext mts "-FileName<DateTimeOriginal" -d "%m-%d-%Y %Hh%Mm%Ss.%%e" "G:\Import Folder\TRIAL RENAME\Main\1"

Drop the -ext mts to rename all recognized file types.  And just add -r to recursively process files in subfolders.

But personally I would suggest using YYYY-MM-DD format instead of MM-DD-YYYY so the files will sort in chronological order.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

okeetd

  • Jr. Member
  • **
  • Posts: 13
Re: Renaming JPGs in a specific folder and directory
« Reply #2 on: September 30, 2019, 12:05:42 AM »
Thank you Phil. That command worked great!  This tool is so fantastic!  Many thanks for your efforts and support!  Tom