ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: TBeach on October 11, 2023, 10:34:16 AM

Title: How to combine file renaming and directory copy into one single command
Post by: TBeach on October 11, 2023, 10:34:16 AM
I like to rename the files and then copy them into date/time stamp folders.

Currenty, I am using the two command lines below. This works very well.

Now, I like to know if it is possible to run one single ExifTool command that combines both file renaming function, and the folder creation/copy function?

In other words, merge the two commands into one single command.

exiftool "-FileName<${Model} ${DateTimeOriginal;}_${ShutterCount; $_ = substr('000000'.$_,-6)}.%e" -d "%Y-%m-%d__%H-%M-%S" -r C:\temp\exiftest\input

exiftool -o . "-Directory<DateTimeOriginal" -d %Y-%m-%d -r C:\temp\exiftest\input

Best Regards
Thomas
Title: Re: How to combine file renaming and directory copy into one single command
Post by: StarGeek on October 11, 2023, 11:42:28 AM
I don't think you can, as that would be processing 2 files at the same time, renaming the base file and then copying that file to another directory.

Technically, you could combine them with the -execute option (https://exiftool.org/exiftool_pod.html#execute-NUM), but there wouldn't be any real advantage to doing so as you would still be running two separate commands.  Also, it would make troubleshooting an error harder.
Title: Re: How to combine file renaming and directory copy into one single command
Post by: TBeach on October 11, 2023, 11:51:23 AM
I understand.
Thanks anyway for a quick answer!
 :)