How to combine file renaming and directory copy into one single command

Started by TBeach, October 11, 2023, 10:34:16 AM

Previous topic - Next topic

TBeach

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

StarGeek

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, 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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

TBeach