Again filename issue - list index of of bound (0)

Started by Beholder3, October 28, 2011, 10:59:44 AM

Previous topic - Next topic

Beholder3

Hi,

I did another mistake and ended up with files called like "- 210 8.jpg". They should have started with the lens name but I wasn't aware the lens name was taken from (the then exmpty) XMP field instead from exif.
I tried to fill the missing XMP lens name via exiftoolGUI, but could not.

Trying to edit exif or XMP on a file named like this immediately brings up an error  "list index of of bound (0)".

I could only correct it after I renamed the files via Windows Explorer first to begin with some characters.

Maybe you have a look into this.

BogdanH

Hi,

I think, this is similar to "filename starting with space character" which you have reported earlier. In this case however, ExifTool thinks filename (starting with minus sign) is actually some command and reports "No file specified" (in console use). Again, I assume this only happens if filename only (without path) is specified.
When GUI opens some of edit forms (Exif, Iptd, Xmp..), it first requires metadata (via ExifTool) for selected file -to populate form with data. Now, ExifTool reports NoFileSpecified error (even filename actually was provided), which is unexpected situation for GUI.. hence "List index out of bounds(0)" error message.
I will take a look in GUI and change this message to something more meaningful -the rest is up to Phil.

Thank you for reporting this
Bogdan

Phil Harvey

There is nothing I can do about filenames beginning with a dash -- they look like exiftool options on the command line.

The only way to get around this is to include the directory name.  (At one time this was FAQ number 23, but I changed it because up till then nobody had ever asked about this so it really wasn't a FAQ.)

So, Bogdan:  If a file specification begins with a "-", you should use "./FILE" in your exiftool command.  This also includes file specifications which already contain a directory if the first directory name begins with "-".

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

BogdanH

#3
Hi Phil,

Quote from: Phil Harvey on October 28, 2011, 12:27:40 PM
There is nothing I can do about filenames beginning with a dash -- they look like exiftool options on the command line.
I assumed that.

Quote
If a file specification begins with a "-", you should use "./FILE" in your exiftool command.  This also includes file specifications which already contain a directory if the first directory name begins with "-".
I didn't know about that solution -I will look into this. Thank you for idea :)

Bogdan

Added: I tried above solution and it works well -it will be implemented in next update. Thanks again, Phil.