need to copy AAE files too.

Started by jgsprenger, February 09, 2020, 12:21:36 AM

Previous topic - Next topic

jgsprenger


Still quite new at this... sorry
i've started using exiftool to reorganize backups of my iphone photos and movies...  last time I was give some excellent help and here's the command line i've been using.


exiftool -o . "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d e:/temp/%Y/%m/%d/%%f%%-c.%%e -r .


and it works awesome!  (thanks)... Minor problem, how do I get exiftool to copy the *.AAE files (see some info about AAE files in this topic https://exiftool.org/forum/index.php?topic=8478.0

how do I modify my command line to copy/move the AAE files at the same time to the same folder as the corresponding jpg/mov etc file?? 

Thanks in advance...

jgsprenger

ok, i was experimenting with the switch

-ext+ AAE

and that did process all the image and AAE files in one command line, but the AAE files dont always end up in the same folder?!?

exiftool -o . "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d ../temp/%Y/%m/%d/%%f%%-c.%%e -r -ext+ AAE .

Anyone have a way to copy the AAE files with the associated image file to the same folder every time? I think the "filemodifydate" "createdate" are going to apply to the AAE file and not the original image file, do the image and sidecar file are getting separated sometime....?

can exiftool remember the folder name from the image file and then move the AAE?

StarGeek

Exiftool treats each file individually.  It doesn't make any connection between a file and it's sidecar file.  What you'll have to do is pick one of the files as a source file and use the tags from that file for both.  This post gives an example of the basic idea, except with XMP sidecar files.  Because the AAE will probably come before any other file, you'll want to use -fileOrder Filename instead of what's in the example command (no dash before Filename).
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jgsprenger

so I tried adding -fileorder to the cl... it really didnt have the effect I wanted and did include some effects I didnt want (copied files to the root of source folder!)...and lots of error messages...  as far as I can tell, I botched it... I have no experience with this tool, so I'm pretty sure i did something wrong.

Anyone have any more suggestions?

Phil Harvey

If you told us what command you used, we could tell you what you did wrong.

- 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 ($).

jgsprenger


oh oops... all I did was add -fileorder to the previous example... thats all... (?)


exiftool -o . -fileorder "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d ../temp/%Y/%m/%d/%%f%%-c.%%e -r -ext+ AAE .

sorry but I dont understand what things like "-Filename<FileModifyDate" etc really are doing and i've read the manual several times now.

i'm so lost...

StarGeek

The -fileorder option needs a tag to sort on.  My example used Filename.  You dropped that.  Also, as I mentioned, you'll want to move the aae files based upon the jpgs using the -TagsFromFile option, otherwise the files might go to a different place.

Quote from: jgsprenger on February 12, 2020, 08:35:53 PMsorry but I dont understand what things like "-Filename<FileModifyDate" etc really are doing and i've read the manual several times now.

The three tag copies ("-Filename<FileModifyDate", "-Filename<CreateDate", and "-Filename<DateTimeOriginal") each are attempting to copy one of the time stamps as the filename.  Each subsequent tag copy overrides the previous one.  So DateTimeOriginal, being the last in the line, will override CreateDate, which will override FileModifyDate.  Now normally the time stamps are make poor filenames by themselves, so the -d (dateFormat) option is used to change the date into something more resembling a directory path/filename. 

I haven't tested it, but try this.  You might want to use Testname in the place of Filename in the tag copies (but not the one after -Fileorder) to see if it works correctly:
exiftool -o . -fileorder FileName -TagsFromFile %d%f.jpg "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d ../temp/%Y/%m/%d/%%f%%-c.%%e -r -ext+ AAE .
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jgsprenger

#7
Thanks StarGeek... its working ... for jpg files with an AAE... the program throws "error opening file" when the AAE file is associated with a MOV or MP4.... how do i list other file ext (like for .MOV, .MP4 files)?

something like:
exiftool -o . -fileorder FileName -TagsFromFile %d%f.{jpg,mp4,mov}   ??

also i tried
exiftool -o . -fileorder FileName -TagsFromFile %d%f.%e    but this combo didnt work properly, it started duplicated files in the destination dirs...


StarGeek

I'd say the easiest thing to do is run a separate command for extension.  I'm not sure there's a way to have multiple source extensions.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

I don't understand what you want, but if you want to copy tags from files with different extensions you can add multiple -tagsfromfile options to the same command.

- 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 ($).

StarGeek

They want to copy sidecar files and their matching jpg, mp4, and mov file.

Phil, if using multiple -TagsFromFile, does the tag copy part need to be duplicated after each -TagsFromFile or can there be just one to cover all three.

In other words, will this work?
-TagsFromFile %d%f.jpg -TagsFromFile %d%f.mp4 -TagsFromFile %d%f.mov "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal"

or does it have to be
-TagsFromFile %d%f.jpg "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -TagsFromFile %d%f.mp4 "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -TagsFromFile %d%f.mov "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal"
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Quote from: StarGeek on February 13, 2020, 11:04:14 AM
if using multiple -TagsFromFile, does the tag copy part need to be duplicated after each -TagsFromFile

Yes.

QuoteIn other words, will this work?
-TagsFromFile %d%f.jpg -TagsFromFile %d%f.mp4 -TagsFromFile %d%f.mov "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal"

No.  In this command -all will be assumed for the first two -TagsFromFile options.

- 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 ($).

jgsprenger


jgsprenger

just following up, .... the added tags didnt really work out as expected... i ended up getting duplicate image files in all folders, like it copies an image file for the *.AAE file and the *.jpg file, and didnt copy the AAE file...

i went back to using
exiftool -o . -fileorder "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d ../temp/%Y/%m/%d/%%f%%-c.%%e -r -ext+ AAE .

and will have to remember to look in adjacent folders for any AAE files (if it matters)....

Thank you all for helping me out... handy little program... great forum support!

Phil Harvey

What command did you use?  It should have been something like this, which should have worked:

exiftool -o . -fileorder filename -TagsFromFile %d%f.jpg "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -TagsFromFile %d%f.mp4 "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -TagsFromFile %d%f.mov "-Filename<FileModifyDate" "-Filename<CreateDate" "-Filename<DateTimeOriginal" -d "../temp/%Y/%m/%d/%%f%%-c.%%e" -ext+ aae .

- 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 ($).