ExifTool Forum

ExifTool => Newbies => Topic started by: apmarsh on January 24, 2012, 12:53:04 AM

Title: windows file location
Post by: apmarsh on January 24, 2012, 12:53:04 AM
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.
Title: Re: windows file location
Post by: Phil Harvey on January 24, 2012, 07:22:12 AM
The "%" character is special in a Windows .BAT file, and must be replaced by "%%' to prevent the batch file parser from eating it.

- Phil
Title: Re: windows file location
Post by: apmarsh on January 25, 2012, 06:53:00 PM
Thanks very much.