ExifTool Forum

ExifTool => Newbies => Topic started by: chuxter on July 24, 2016, 01:24:38 PM

Title: How to get the -w option to write file?
Post by: chuxter on July 24, 2016, 01:24:38 PM
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:

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.
Title: Re: How to get the -w option to write file?
Post by: Hayo Baan on July 24, 2016, 03:29:19 PM
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).
Title: Re: How to get the -w option to write file?
Post by: Phil Harvey on July 24, 2016, 09:33:32 PM
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
Title: Re: How to get the -w option to write file?
Post by: chuxter on July 24, 2016, 10:29:40 PM
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?
Title: Re: How to get the -w option to write file?
Post by: Hayo Baan on July 25, 2016, 01:47:56 AM
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.
Title: Re: How to get the -w option to write file?
Post by: chuxter on July 25, 2016, 11:29:42 AM
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!