windows file location

Started by apmarsh, January 24, 2012, 12:53:04 AM

Previous topic - Next topic

apmarsh

I wish to rename files in .ARW format to include the date created. I wrote this:
@echo off
echo Hello this is a test batch file
pause
rem exiftool "-DateTimeOriginal" C:\Users\USER\Pictures\21-10-2011\1-11-2011
rem pause
exiftool "-Directory<DateTimeOriginal" -d %y%m%d C:\Users\USER\Pictures\21-10-2011\1-11-2011
pause

The first run of exiftool works fine, but the second says "no file specified"
Dumb I know but what am I doing wrongly? There are several files in the directory.

Phil Harvey

The "%" character is special in a Windows .BAT file, and must be replaced by "%%' to prevent the batch file parser from eating it.

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

apmarsh