ExifTool Forum

ExifTool => Newbies => Topic started by: EDIT on February 22, 2015, 06:10:08 AM

Title: MOV files rename with creation date in Mac OS 10.9.5
Post by: EDIT on February 22, 2015, 06:10:08 AM
Hello,
first of all please consider that I am not a developer and have no idea about programming.

I have following problem: the MOV (Apple) files get another creation / modification date after transfer from iPhone to computer (MacBookAit OS 10.9.5). Also the name of the file is changed. Original iPhone files are named IMG_xxxx.mov, on computer they get the name WD_yyyy.mov (this is due to the fact that we upload the files with WD Photo application.
I would like to remane the MOV files so that they get the following format:

YYYYMMDD_hhmm_OriginalFileName.mov
where
YYYYMMDD = original Creattion Date from the Meta Data of the file
hhmm = time of file creation from the Meta Data of the file
OriginalFileName = IMG_xxxx.mov

I would like to rename all files in an indicated folder (Users/edyta/Movies/TestExiftool).
I have installed ExifTool and have been able to run it in Terminal.
In Terminal when putting command 'pwd' I get following path indicated:
/Users/edyta
The files I would like to rename are in following folder:
Users/edyta/Movies/TestExiftool

Could you please help me and write which commands exactly and in which sequence I should put in the Terminal in order to rename all MOV files in the folder: Users/edyta/Movies/TestExiftool into the format: YYYYMMDD_hhmm_OriginalFileName.mov.

I really need an exact command, because I am not able to follow a pattern (I tried several examples from this forum but all the time I get an error that no files found, apparently I am using the pattern incorrectly therefore I would appreciate not to send me to existing posts)

Thank you very much.
Edyta
Title: Re: MOV files rename with creation date in Mac OS 10.9.5
Post by: Phil Harvey on February 22, 2015, 09:36:29 AM
Hi Edyta,

Try this:

exiftool -d %Y%m%d_%H%M_%%f.%e "-filename<createdate" -ext mov /Users/edyta/Movies/TestExiftool

See this page (https://exiftool.org/filename.html) for more help with renaming files.

- Phil
Title: Re: MOV files rename with creation date in Mac OS 10.9.5
Post by: EDIT on February 22, 2015, 03:01:40 PM
Hello Phil,
Thank you very much for your quick response.
I have tried the command and geberally it works, the result is following:
- Name changed with the date as expected - OK
- The original file name not retrieved - is this generally possible?
- the extention of the file is ". x" where x is a number.

Example of result: 20130205_1030_WD_4E3B. 5
The files cannt be opened with this extention.
Is there anything which can be done to keep the original MOV extention?

Thanx in advance for further suggestions.
Edyta
Title: Re: MOV files rename with creation date in Mac OS 10.9.5
Post by: Phil Harvey on February 22, 2015, 03:49:35 PM
Hi Edyta,

Can you post the exact command that you used?  Perhaps cut and paste from your terminal.  Also, please add the -v option for me, and post the exiftool output as well.

I don't understand the result you are getting.

- Phil

Edit:  Darn.  I see now that I forgot to escape the "%e".  It should be "%%e".  This should work:

exiftool -d %Y%m%d_%H%M_%%f.%%e "-filename<createdate" -ext mov /Users/edyta/Movies/TestExiftool

Title: Re: MOV files rename with creation date in Mac OS 10.9.5
Post by: EDIT on February 23, 2015, 04:04:54 PM
Hello Phil,
Thank you very much. It works perfect now. After having a "real live" example it is much easier to understand the logic of commands and tags.
Thanx a lot. It is really helpful.

Have a goog evening.
Edyta