I would like to save info from the PUBLISHER field to a filename. That may be a 0 byte file with only the Publisherfield as filename.
I did manage to export a cover to a file named %PUBLISHER%.jpg
But the disadvantage is that if there is no cover there will be no file and if the PUBLISHER field is empty I get a nameless ".jpg" file.
Does someone knows how to create an action which creates an empty filename with the Publisher as filename? And only if the publisher field is present. When the Publisher field is blank no file is needed. 1 file for 1 directory is enough.
That works. I had to place the filename between " " to make it work correctly.
Still, when there is no publisher I get a nameless .txt file.
And it could lead to many instances of the command prompt at the same time when processing many files.
It is not a very elegant solution but it works. I'd rather use an action because there I do all most other things. An action which starts a tool would be nice to prevent one has to use the right mousebutton to start a tool.
If I prefer the method with exporting a cover fom a file named %publisher%.jpg, which can be done from an action, which notation can I use to prevent creating a nameless .jpg file?
Use a filter?
Enter a dummy publisher?
If there is an embedded picture, the export will create a file... So you have to take precautions like filtering.
Even the absence of data is data.
In respect to the command shell: you can use a batch file that checks for the existence of data or files. You would then call that batch file instead of the command shell command directly.
See e.g. here for more information about shell syntax: http://ss64.com/nt/syntax.html
What I basicly want is when the Publisher field contains data, a file with a name like "Publisher- Stockfisch Records" is placed in the directory where the album is. No extension needed, and no file has to be created when the publisher is unknown/blank.
I use it just as reminder when browsing in windows explorer. If path length wasn't an issue I would put it in the directory name.
I will have a look with scripts, I have never used it, but I will try Detlevs proposal.
Another possbility is to create a file with information which is always available and which makes some sense.
I.e. a file with Bitdepth-Samplefreq-Filetype (Publisher):
16bit-44kHz-FLAC (.no extesion)
16bit-44kHz-FLAC (Publisher- Stockfisch Records) (.no extesion)
when the publisher is available.
I created a 'new export configuration' file, deleted what's in and pasted your 4 rows of code.
When applied as an action I get a '[ SYNTAX ERROR IN FORMATTING STRING ]' file.
Via the menu file export the same result
It almost works. In the Temp directory a file named CreateTextfileForPublisher.cmd is created.
But it isn't executed so no publisher file in the album directory. If I launch it manually the publisher file is created and the CreateTextfileForPublisher.cmd file deletes itself, just as expected.
Looking how to get the cmd file executed automaticly.
If I do the export via the file menu the export ends wit a dialog box with a question if I want to view the export file. If I choose yes, the publisher file will be created in the album's directory. So answering yes triggers the .cmd file.
In an export action such dialog box/question isn't shown, maybe the problem is there?