Skip Menu |

This queue is for tickets about the Image-ExifTool CPAN distribution.

Report information
The Basics
Id: 17557
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Image-ExifTool

People
Owner: Nobody in particular
Requestors: herthh [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.87
Fixed in: 5.87



Actually my version if 5.99, used on WinXP. If -o flag is used, the 1st file of any given directory is being claimed to "already exist" and not processed. Of course, it does not exist, the -o directory is new. [... c:\trip2006>perl c:\util\ExifTool\exiftool -o "new102CANON/%f.%e" -DateTimeOriginal-=2.0 "102CANON" Error: File already exists: new102CANON/. - 102CANON/IMG_0227.CR2 1 directories scanned 1 directories created 69 image files updated 1 files weren't updated due to errors c:\trip2006>perl c:\util\ExifTool\exiftool -o "new_any/%f.%e" -DateTimeOriginal-=2.0 "102CANON" Error: File already exists: new_any/. - 102CANON/IMG_0227.CR2 1 directories scanned 1 directories created 69 image files updated 1 files weren't updated due to errors ...] Remedy is to copy 1st file to yet another smaller name. for example here, make: cp IMG_0227.cr2 IMG_0226.cr2, in which case the file 0226 will be claimed as "already exists" and the 0227 will be processed. [... c:\trip2006>perl c:\util\ExifTool\exiftool -o "another/%f.%e" -DateTimeOriginal-=2.0 "102CANON" Error: File already exists: another/. - 102CANON/IMG_0226.CR2 1 directories scanned 1 directories created 70 image files updated 1 files weren't updated due to errors c:\trip2006>dir another\IMG_0227.CR2 Volume in drive C is WinXP ThH Serial number is 6417:19FD Directory of C:\trip2006\another\IMG_0227.CR2 9-02-06 14:35 7,420,082 ___A_ IMG_0227.CR2 7,420,082 bytes in 1 file and 0 dirs 7,421,952 bytes allocated ...] Using perl version: This is perl, v5.8.7 built for MSWin32-x86-multi-thread (with 14 registered patches, see perl -V for more detail) Copyright 1987-2005, Larry Wall Binary build 815 [211909] provided by ActiveState http://www.ActiveState.com ActiveState is a division of Sophos. Built Nov 2 2005 08:44:52 Thomas
Subject: Looks like the shell is eating the % codes
From: exiftool
This looks to me like the shell is eating the %f and %e. I assume you're using a Windows cmd shell? I don't have access to a Windows machine right now (and I'm not a Windows expert), but perhaps one of these will work: perl c:\util\ExifTool\exiftool -o "new102CANON/%%f.%%e" perl c:\util\ExifTool\exiftool -o 'new102CANON/%f.%e' perl c:\util\ExifTool\exiftool -o "new102CANON/\%f.\%e" I think it is most likely that the 1st line will work. Give it a try. I will try it myself as soon as I can get access to a Windows machine.
Well, I tested this using the Windows cmd shell and I could not reproduce the problem. I created the exact same directory structure as you mention, and used ExifTool 5.99 and ActivePerl 5.8.7 and there were no problems: C:\trip2006>c:\Perl5.8.7\bin\perl c:\Image-ExifTool-5.99\exiftool -o "new102CANON/ %f.%e" -DateTimeOriginal-=2.0 "102CANON" 1 directories scanned 1 directories created 4 image files updated But my "dir" listing looks different from yours (mine doesn't show the file attributes). So it looks to me like you are not using the the same Windows cmd shell as me. I'm using the cmd.exe that comes with Windows XP. My strong suspicion is that your shell is causing the problem. Which shell are you using, and can you try the test in another shell (ie. cmd.exe)? It would be good if you could run some tests to try to isolate the problem a bit more.
Subject: You are correct!
From: herthh [...] comcast.net
On Fri Feb 10 10:37:29 2006, EXIFTOOL wrote: Show quoted text
> Well, I tested this using the Windows cmd shell and I could not > reproduce the problem. I > created the exact same directory structure as you mention, and used > ExifTool 5.99 and > ActivePerl 5.8.7 and there were no problems: > > C:\trip2006>c:\Perl5.8.7\bin\perl c:\Image-ExifTool-5.99\exiftool -o > "new102CANON/ > %f.%e" -DateTimeOriginal-=2.0 "102CANON" > 1 directories scanned > 1 directories created > 4 image files updated > > But my "dir" listing looks different from yours (mine doesn't show the > file attributes). So it > looks to me like you are not using the the same Windows cmd shell as > me. I'm using the > cmd.exe that comes with Windows XP. > > My strong suspicion is that your shell is causing the problem. Which > shell are you using, and > can you try the test in another shell (ie. cmd.exe)? > > It would be good if you could run some tests to try to isolate the > problem a bit more. >
You were correct! C:\trip2006>perl c:\util\ExifTool\exiftool -o "withcmd/%f.%e" -DateTimeOriginal-=2.0 "102CANON" 1 directories scanned 1 directories created 71 image files updated c:\trip2006>perl c:\util\ExifTool\exiftool -o "with4nt/%f.%e" -DateTimeOriginal-=2.0 "102CANON" Error: File already exists: with4nt/. - 102CANON/IMG_0226.CR2 1 directories scanned 1 directories created 70 image files updated 1 files weren't updated due to errors I am using for many years something called 4dos, later 4nt. http://www.jpsoft.com/ This is a convenient cmd.exe replacement making life with windows more bearable. This is the 1st time that I encountered a problem with this shell! Thomas
From: exiftool
I just downloaded 4NT to test this out. With this shell, you need to escape '%' characters with a second '%'. The following example is a simple illustration of the problem and the solution: 4NT eats the "%f" and "%e": [C:\]echo "new102CANON/%f.%e" "new102CANON/." Solution: [C:\]echo "new102CANON/%%f.%%e" "new102CANON/%f.%e" I tested this with exiftool too, and it works fine.
Subject: Escaping % with windows
From: herthh [...] comcast.net
On Tue Feb 14 07:58:55 2006, guest wrote: Show quoted text
> I just downloaded 4NT to test this out. With this shell, you need > to escape '%' characters > with a second '%'. The following example is a simple illustration of > the problem and the > solution: > > 4NT eats the "%f" and "%e": > > [C:\]echo "new102CANON/%f.%e" > "new102CANON/." > > Solution: > > [C:\]echo "new102CANON/%%f.%%e" > "new102CANON/%f.%e" > > I tested this with exiftool too, and it works fine.
Indeed, thanks, I discovered this meanwhile as I tried to make a *.bat with these commands. In such case cmd.exe also needed this escape of the % token. Than I saw that both cmd.exe and 4nt.exe do the same job: c:\trip2006>more adj2h.bat perl c:\util\ExifTool\exiftool -o "d2_%%d/%%f.%%e" -DateTimeOriginal-=2.0 %1 perl c:\util\ExifTool\exiftool "-DateTimeOriginal>FileModifyDate" d2_%1 of course its still a bug in 4nt, which handles some of the %'s inconsistently. I appreciate the help! Thanks, thomas