Wildcards in command line import

Sep 19, 2016 at 2:57 PM
Hello Dijji,

many thanks so far for your work! Not much is missing, but ;-) ...

My Questition is:

A. is it possible to "import" some simple tags with ONE xml file for all files in a folder?
B. ... if a batch file loops through a list of folders, sets the tags for each folder, saves the xml file and imports the tags for all files
C. ... if a batch file loops through a list of files in a folder

CALL %_filemeta% -i -x=propsfolder1.xml .folder1*.*
Coordinator
Sep 19, 2016 at 6:56 PM
A. No, it is not possible. I did consider exporting and importing all data for all files in a folder to a single XML file. Eventually, I decided against doing it because of the cases where the set of files in the folder was changed. For instance, it wasn’t clear what to do if one of the imports in a shared XML file referenced a file that no longer existed in the target folder. Would that abort the operation? Be silently ignored? I couldn’t think of any sound precedent, so I stuck to maintaining the same cardinality.

B, C. I’m not quite sure what you mean by these cases. At the moment, you can of course use wild cards for files or batch iterators to loop through files and folders, for example the equivalent:
CALL %_filemeta% -e -f=temp *.txt > nul || goto error
and
FOR /f %%G IN ('dir /b *.txt') DO (
  CALL %_filemeta% -e -f=temp %%G > nul || goto error )