Renaming .MOV video files from DSLR

Started by gerlos, June 02, 2013, 12:50:26 PM

Previous topic - Next topic

metso

Hooray , I cracked it....

so I adjusted the code from

'-filename<${FocalLength;s/ //;s/\./_/}%-.2nc.%e'

to

'-filename<%f_${FocalLength;s/ /_/}.%e' \


so that it appends the focal length to the filename instead of replacing the filename.

I created an automator workflow to set the slate, wit ref, Cam and sequential tk number before the shell script to append the focal length.

it seems to work nicely now.

such that I can adjust the names of the raw files
MVI_0007.mov
MVI_0008.mov
MVI_0009.mov
MVI_0010.mov
MVI_0011.mov
MVI_0012.mov

to

78A_WB_tk01_18.0_mm.mov
78A_WB_tk02_55.0_mm.mov
78A_WB_tk03_18.0_mm.mov
78A_WB_tk04_10.0_mm.mov
78A_WB_tk05_17.0_mm.mov
78A_WB_tk06_18.0_mm.mov

Slate:78A, (W)Witness(B)B cam tk__


thank you for your help and hints along the way.

Phil Harvey

I'm glad you found a solution.  I didn't realize you wanted the copy number to be sequential across all files.  For this, you could have used %C (upper case):

exiftool '-filename<7BA_WB_tk%1.2C_${FocalLength;tr/ /_/}.%e' -fileorder filename ...

Here I changed the single substitution (s///) to a translation (tr///) because logically it makes more sense and is more efficient for single characters.  Read about the %C feature in the -w section of the application documentation.

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

Chris Schick

Hi there,

I believe, the answer to my question is down below - I just don´t get it!  I´m so sorry to bother you with this, but I´m really frustrated...

Here is what I got:
* a Macbook with ExifTool latest version and OS X Terminal
* media data (*.mov, *.mp4, *.jpg, *.png) from several cameras incl. iPhones stored in the following directory /Users/christian/Desktop/Sorted
* an empty destination folder /Users/christian/Desktop/Sorted2

Here is what I want to achieve using ExifTool:
* All the should be renamed according to this format "yyyy-mm-dd_hh-mm-ss_CameraMake&Model_(original file name).ext (ie: 2016-04-15_22-44-55_iPhone6S_(img_345324).jpg
* All files should be automagically moved to subdirectories of the destination folder named according to this format "yyyy-mm-dd_CameraMake&Model"

Could you please help me to get going?

Thanks,


Christian



Quote from: Phil Harvey on June 03, 2013, 06:25:23 PM
I should have thought of this earlier:

exiftool -P -d '%Y-%m-%d %H.%M.%S' \
    '-filename<${DateTimeOriginal}_${Make;}.%e' \
    '-filename<${CreateDate}_${Make;}_${Model;}.%e' \
    '-filename<${DateTimeOriginal}_${Make;}_${Model;}.%e' \
    $@


This should do what you want in one command.  The last valid assignment supersedes the others.

- Phil

Phil Harvey

Hi Chris,

Sorry for the delay.  I'm beaching it this week and won't have a chance to spend time answering forum questions in detail until next week.

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