News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

Exiftool file renaming

Started by j99mac, November 22, 2021, 01:03:37 PM

Previous topic - Next topic

j99mac

Is it posable to use exiftool to rename file in many folders sequently starting at 1 in each folder?
Example
Abc
   abc001.tif - abc00x.tif
abcd
   abcd001.tif - abcd00x.tif

Phil Harvey

Yes.

exiftool "-filename=abc%.3nc.%e" -r DIR

- 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 ($).

j99mac

Thanks this worked. Is it posable to exclude a directory or a folder when renaming?

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

j99mac

#4
if I want to use -ignore to not runa  command on a directory witch is inside a sub directory could I add this to the end of my file path-i test
example
exiftool "-filename=abc%.3nc.%e" -r DIR -i *DIR*

or is there another way to ignore a specific subdir?

When run exiftool "-filename=abc%.3nc.%e" -r DIR -i *DIR*
One of the file desaperd

is there something I need to change

StarGeek

You can't use wildcards.

If your paths are
C:\aa\
C:\aa\bbb\
C:\aa\bbb\ccc\
C:\aa\bbb\ccc\ddd\
C:\aa\ccc\


Then to ignore ccc in the bbb directory (which will include subdirectory ddd), you would use the full path -i C:\aa\bbb\ccc\ or if you had CD'ed into aa, you could use the relative path -i .\bbb\ccc
You could also use -i ccc to ignore both C:\aa\bbb\ccc\ and C:\aa\ccc\
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

j99mac

I am working on a Mac
so C:\ would not work

j99mac

would it deposable to add i $dirt to make the script not rename files in a sub dir?
would this work?
exiftool "-filename=abc%.3nc.%e" -r DIR -i $dir