StefanJoa
StefanJoa

Reputation: 21

ExifTool | Return a list of moved files

I'm using ExifTool on my Synology NAS to automatically sort all my pictures in folders with the following pattern: Year\Month\Day\Filename.extension

After sorted my files automatically, I need to start the process synoindex to index the new files in Synology Photostation. This process requires at least a directory or filename with should get indexed. Therefore I'm searching a method which returns all new file paths of the moved files (with ExifTool). Does anybody have a idea how to return these paths with ExifTool?

exiftool -d '%Y\%m\%d\%H.%M.%S%%-c.%%e' "-filename<CreateDate" '../Test'

Upvotes: 2

Views: 243

Answers (1)

StarGeek
StarGeek

Reputation: 5771

You could use the -v (verbose) option and piped the output through sed(?) (sorry, not completely familiar with unix commands) to get a list of the changed files.

For every file that gets moved/renamed, there will be a line that indicates the move. For example:
'/old/path/to/file/OldName.jpg' --> '/new/path/to/file/NewName.jpg'

That should be fairly easy to parse out the new filename. There will be some additional lines that say Setting new values from…, possibly Created directory, that can be ignored.

Files that are not moved/renamed will have these lines
Setting new values from FILE
Nothing changed in FILE

Upvotes: 2

Related Questions