Author Topic: need to copy AAE files too.  (Read 572 times)

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
need to copy AAE files too.
« on: February 09, 2020, 12:21:36 AM »

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

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #1 on: February 09, 2020, 07:04:22 PM »
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

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: need to copy AAE files too.
« Reply #2 on: February 09, 2020, 08:08:36 PM »
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).
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #3 on: February 11, 2020, 05:24:47 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: need to copy AAE files too.
« Reply #4 on: February 11, 2020, 09:41:04 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #5 on: February 12, 2020, 08:35:53 PM »

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

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: need to copy AAE files too.
« Reply #6 on: February 12, 2020, 09:10:01 PM »
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.

sorry 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 .
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #7 on: February 13, 2020, 12:24:06 AM »
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...

« Last Edit: February 13, 2020, 12:34:59 AM by jgsprenger »

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: need to copy AAE files too.
« Reply #8 on: February 13, 2020, 01:24:56 AM »
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.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: need to copy AAE files too.
« Reply #9 on: February 13, 2020, 07:06:27 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: need to copy AAE files too.
« Reply #10 on: February 13, 2020, 11:04:14 AM »
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"
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: need to copy AAE files too.
« Reply #11 on: February 13, 2020, 11:15:58 AM »
if using multiple -TagsFromFile, does the tag copy part need to be duplicated after each -TagsFromFile

Yes.

Quote
In 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #12 on: February 13, 2020, 01:36:28 PM »
thanks... testing these out now!

jgsprenger

  • Jr. Member
  • **
  • Posts: 10
Re: need to copy AAE files too.
« Reply #13 on: February 20, 2020, 10:01:05 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: need to copy AAE files too.
« Reply #14 on: February 21, 2020, 07:20:43 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).