Author Topic: "error opening file" when selecting multiple files  (Read 1364 times)


  • Newbie
  • *
  • Posts: 1
"error opening file" when selecting multiple files
« on: January 14, 2016, 01:33:38 AM »

Newbie here so please be gentle...

First, thank you for making this tool available. While researching my problem I found quite a lot about the tool's capabilities, and it seems amazing.

Second, I have done an extensive search regarding my issue (including this forum) and could not resolve it, which is why I post here.

I am trying to copy all exif data between a large number of JPG files. Source and destination folders have the same number of files, filenames are the same in both folders.

No matter what I do and which variant of the command I issue I get error messages for each file:
Warning: Error opening file - <FILENAME.jpg>

I get this in both the GUI and CLI.

The commands I tried:

exiftool -tagsfromfile "C:\Temp\Test_Exif\Source\%f.%e" -ext jpg "C:\Temp\Test_Exif\Destination"

exiftool -tagsfromfile C:\Temp\Test_Exif\Source\%f.jpg C:\Temp\Test_Exif\Destination

When I try a single file in the GUI it works fine!
When I try a single file using CLI I get an error:
Error: File not found - C:/Temp/Test_Exif/Destination/1991-12-29_FL07-FR10.jpg   (notice the backslashes turned into forward slashes)
(the command I used is:   exiftool -tagsfromfile "C:\Temp\Test_Exif\Source\1991-12-29_FL07-FR10.jpg" "C:\Temp\Test_Exif\Destination\1991-12-29_FL07-FR10.jpg")

I checked, double checked and triple checked the spelling of files and folders (I also used tab to complete the names).
I checked, double checked and triple checked the permissions on the files and folders. No issue there.

Then, out of desperation, I changed one file name from "1991-12-29_FL07-FR10.jpg" to "1.jpg" and all exif data was copied without a problem!
So it appears the tool cannot deal with my file names.

Can you please assist? I really don't want to copy my exif data one file at a time, nor do I want to change all the file names.

Any help will be appreciated.


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: "error opening file" when selecting multiple files
« Reply #1 on: January 14, 2016, 08:40:37 AM »
I'm guessing here, but could there be special characters in the file name that are causing problems?  For example, like an em dash or an en dash instead of a regular minus dash?  ExifTool does convert backslashes to forward slashes, so this isn't the problem.

But if you want to do a whole directory, you don't specify the file name anyway.  You just specify the directory name.  Try copying the file into a test directory and running a command something like this:

exiftool -tagsfromfile "C:\Temp\Test_Exif\Source\%f.%e" "C:\testdir"

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