can't seem to use DIR to modify metadata in an entire directory

Started by Al Jensen, June 03, 2014, 12:14:09 AM

Previous topic - Next topic

Al Jensen

Following is a command file which I am trying to use to insert the current file name into the PreservedFileName metadata field.  The first two examples work OK, but if I try to make the change in the entire directory, following the example in the instructions, it fails.  What am I doing wrong?
Newbie Al
-----------------------------------------
dir
pause
exiftool.exe -PreservedFileName=" abrie" apd_0860.jpg
exiftool -s apd_0860.jpg
pause
exiftool.exe "-PreservedFileName<FileName" apd_0860.jpg
pause
exiftool -s apd_0860.jpg

Pause
rem Works
exiftool.exe "-PreservedFileName<FileName" DIR
rem Doesn't Work- Why??

Phil Harvey

Quote from: Al Jensen on June 03, 2014, 12:14:09 AM
exiftool.exe "-PreservedFileName<FileName" DIR

You need to insert the name of the actual directory in place of "DIR".  For example:

exiftool.exe "-PreservedFileName<FileName" c:\images

or

exiftool.exe "-PreservedFileName<FileName" .

for the current working directory.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).