subfolder and renaming

Started by j99mac, December 06, 2021, 02:07:04 PM

Previous topic - Next topic

j99mac

I have a bunch of file with sub directories that have files in them that need to rename files.

the directories for example I have are
abc/test/abc_test_s.tif
abcd/test/abcd_test_s.tif

How do I get the following command to rename file in the test folder?
When I run my command the files do not get renamed

  p=${fn%%_*}
  p1=$p/test
echo "Enter Number Example 0034 Type 34"
  read tNum
exiftool -r '-FileName<${CreateDate;DateFmt("%Y%m%d")}_'$tNum'_${CreateDate;DateFmt("%H%M")}_test_'$type1'.%e' "$p1 "$p1"_test_s.tif"

StarGeek

Figure out how to run the command by itself on the command line before creating a script for it.  I can't help here because I don't know what your variables stand for or what they are actually passing to exiftool.
* 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

The veritable are
p is folder name example abc
p1 is folder where images to be renamed example abc/test
tNum is a user input where a user adds a number

I also will want it to run recursively or on any folder named test with in $path

At the and the files would be in $path
$path would be a user input