ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: captured on April 03, 2017, 12:05:57 AM

Title: Move/Copy Multi Hierarchy, no modifications
Post by: captured on April 03, 2017, 12:05:57 AM
System;
- Debian Linux Sid 64 bit, ext4
- libimage-exiftool-perl  10.40-1

Objective;
Copy/Move all into multi level hierarchy without any modifications to the originals.
Copy all files in Directory: Dump , to  Directory: Working , desired hierarchy below;
Working
├── 2016-10-30
│   └── D750
└── 2016-10-31
    └── D3

Code tried;
1st, cd into Directory "Working"
/usr/bin/exiftool -m -P -o . -Directory<$DateTimeOriginal/${Model;} -d /media/External/Working/%Y-%m-%d -r /media/External/Dump/

Question(s);
1. Is the code correct to produce copies that have not been modified in any way from the originals ?
2. I am receiving errors;
    a.) Warning: Invalid EXIF text encoding for UserComment, what is that from ?
    b.) Warning: File format error
    c.) already exists
    d.) Error: Nothing to write
    Will any of these indicate modifying the originals ?
3. Image files from the exiftool directories are being written to my root directory / . Very odd.
     I'm not 100 percent sure it's exiftool, but I noticed images in this directory after running exiftool.
     Ever experienced that behaviour ?
4. "1690 files weren't updated due to errors"... Could this be from 'already exists' errors ?

Thank you much.
   
Title: Re: Move/Copy Multi Hierarchy, no modifications
Post by: Hayo Baan on April 03, 2017, 01:59:32 AM
Quote from: captured on April 03, 2017, 12:05:57 AM
Question(s);
1. Is the code correct to produce copies that have not been modified in any way from the originals ?
2. I am receiving errors;
    a.) Warning: Invalid EXIF text encoding for UserComment, what is that from ?
    b.) Warning: File format error
    c.) already exists
    d.) Error: Nothing to write
    Will any of these indicate modifying the originals ?
3. Image files from the exiftool directories are being written to my root directory / . Very odd.
     I'm not 100 percent sure it's exiftool, but I noticed images in this directory after running exiftool.
     Ever experienced that behaviour ?
4. "1690 files weren't updated due to errors"... Could this be from 'already exists' errors ?

1. Yes, your command will leave the files unchanged.
2. No, they won't, but they do indicate some problems with the files.
  a) You can mostly ignore, but indicates that the usercomment was incorrectly written by some application
  b) These are probably not image files or files that have become corrupted somehow. You need to investigate these!
  c) Means that some other file was already moved to the same location, you either have true duplicates or the date and filename are the same
  d) You'll need to have a look at those, it does mean exiftool couldn't work with the file (not sure what, but looking at those files should tell you)
3. This could be the case if these files don't have a DateTimeOriginal (the directory spec in your command will be empty in that case).
4. Yes, but also case b and d. You need to investigate further.

Hope this helps,
Hayo
Title: Re: Move/Copy Multi Hierarchy, no modifications
Post by: captured on April 03, 2017, 04:49:29 AM
Many Thanks Hayo.

Is there a method to direct errors to a log file for later review ?

Cheers.
Title: Re: Move/Copy Multi Hierarchy, no modifications
Post by: Phil Harvey on April 03, 2017, 07:20:05 AM
Quote from: captured on April 03, 2017, 04:49:29 AM
Is there a method to direct errors to a log file for later review ?

In a bourne shell you can add this to your command to send stderr to a file named "err.out":

2>err.out

- Phil
Title: Re: Move/Copy Multi Hierarchy, no modifications
Post by: captured on April 04, 2017, 09:28:00 AM
Thanks to Phil and Hayo.

[SOLVED]