How to get the -w option to write file?

Started by chuxter, July 24, 2016, 01:24:38 PM

Previous topic - Next topic

chuxter

I'm a beginner w/ exiftool. I have read a lot of the documentation. As I read, I try everything. When I got to the -w option, it didn't work. Not everything else worked either, but this was so simple and basic I focused on it.

I have tried:

  • "exiftool -w txt dsc_7026.jpg"
  • "exiftool -w txt dsc_7026.jpg"
  • "exiftool -w .txt dsc_7026.jpg"
  • "exiftool -w! txt dsc_7026.jpg"

I get an error message:

Error creating dsc_7026.txt
       1 files could not be read
       0 output files created

The syntax I'm using must be wrong? Or it doesn't work w/ Windows 10?

BTW, when I type "exiftool dsc_7026.jpg" I see the EXIF data written to the DOS window. I can add some other options like "-sort" and they work.

Any help with this would be appreciated.

Hayo Baan

My guess is you do not have write access in the directory you are trying your command; exiftool -w txt FILE should just work (if FILE exists, of course).
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

What is the current working directory (the "pwd" command I think works in Windows to print the current working directory).  As hayo said, make sure you have write permission in this directory.

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

chuxter

Thank you both for replying. Why would I not have write permission? I'm a dummy. I wrote to the the folder from Windows because exiftool.exe and other plectra are there. In the Command Prompt window, I am located in that directory. When I type "dir" it shows exiftool.exe, 2 JPEG files, and the exifGUI directory.

I tried the "pwd"; didn't work. I tried "MD test" and access was denied. Hmmm...

Tried many versions of this:

icacls "c:\program files(x86)\exiftool" /q /c /t /grant Users:F

w/o success.

Does anyone want to suggest what I should do to get write access?

Hayo Baan

What directory are you in? What does the c: prompt (the text on the command line before the cursor) tell you?

To set the rights, you as a user need to be able to write in that directory, which you currently don't seem to be able to do (which is kinda odd since you placed exiftool there...). Anyway, to set those rights, I suggest right clicking the directory in the Windows explorer and then change the access rights in the properties.
Hayo Baan – Photography
Web: www.hayobaan.nl

chuxter

I'm in the correct directory.

I went back to File Explorer in Win 10 and Bingo!...that folder was read only! I have no idea how or why it got set?

When I tried to reset it, Windows would let me check the Write box but looking again afterward it didn't work. :-(

I Googled the issue and tried clicking on the Security tab => Edit => Users and then check Write. I looked again and it stayed checked. :-)

Trying "exiftool -w txt dsc_7026.jpg" again, it successfully wrote a txt file. It was a Win 10 issue that I can't explain!

Thanks for your help!