Question to -W directory\%f

Started by herb, May 24, 2019, 11:44:32 AM

Previous topic - Next topic

herb

Hello Phil,

I am working with Exiftool 11.44 on a Windows 7 system.

After a long time I had to retest my application and I have the following finding:

In order to export tags into a sidecar file I have the following cases:
(a) export into a sidecar file to be created inside the current directory (=directory of source file) is done with options:
    -W %d%f.%e_%t   for embedded images
    -o %d%f.<extension>   for e.g. EXIF tags
(b) export into a sidecar file given with fully qualified path and filename is done with options:
    -W <path>\<file>.<extension>   for embedded images
    -o <path>\<file>.<extension>   for e.g. EXIF tags
(c) export into a sidecar file given with fully qualified directory-path and filename to be taken from source is done with options:
    -W <directory-path>\%f.<extension>   for embedded images
    -o <directory-path>\%f.<extension>   for e.g. EXIF tags

Cases (a) and (b) work as expected
But for case (c) I get errormessages like
- Error creating directory <directory>
- Error creating <file>
both with properly built names.
I get the errormessages also in case the directory does exist.


As said at the beginning I did not test my application for a longer time; but I remember that also case (c) was working properly.
Has something changed so that I have to correct/adapt my application or
is this an error in Exiftool?

Thanks for your help in advance
Best regards
Herb

Phil Harvey

Hi Herb,

If you get an error creating a directory and the directory name is properly formed and doesn't contain any special characters, then it must be a permission problem.  Be sure that you have write permission in the parent 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 ($).

herb

Hello Phil,

thanks for your quick reply and yes, I have all permissions.
Cases (a), (b) and (c) are tested within one login and also for case (b) directories are created as necessary.

Best regards
Herb

herb

Hello Phil,

In meantime I continued testing.
But first I want to give some additional information: my application starts Exiftool with -stay_open and sends all commands von pipe to stdin.
I performed my tests with *.jpg files and also with some FLIR jpg files.

Now I did also the tests using DOS-box only.
Here all directories and files are created as necessary.
But I have another finding: variable %t is ignored building the filename.

Sorry that I mentioned these details so late.

Thanks again in advance and
Best regards
Herb

Phil Harvey

Hi Herb,

Can you give me a command that I can use here to reproduce the effect you are seeing?

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

herb

Hello Phil,

thanks that you will look into my problem. But this is not necessary any more. The problem was in front of the screen.

Today I repeated all tests from scratch within a new environment. After a long time of testing I found by accident that the directory name I used for this specific testcase contained a non printable - non visible - unicode control character. My text-editor ignored this character also.

So I have to say sorry that I started this post.

Thanks again and
Best regards
Herb

Phil Harvey

Hi Herb,

Great.  Glad this is solved.

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