Page 1 of 1

Run command with list of tagged files

Posted: Tue Nov 06, 2007 10:58 pm
by garrem
Hi, all. XnView is a great program! Merci, Pierre!

While trying to find a way to launch JAlbum from XnView, I found that XnView's "Open With" feature currently runs the specified command once for each tagged file. So, if 10 files are tagged, the command would get run 10 times, with a single filename as a parameter each time.

But in my case, it would be nice to have the command run only once, but given a list of all the tagged file names. That way, the external program can operate on all the files at once.

If many files are tagged, line/buffer length issues might occur. For this reason, might it be possible for XnView to create a temporary file containing a list of the file names, and then run the external command with that temporary file as an argument?

If this type of behavior would configurable with a few new check boxes in the "Add Program" dialog, this would be a very flexible way to interface with other programs.

Thanks for reading!

-Matt

PS- Any other suggestions for how to do this type of thing would appreciated!

Re: Run command with list of tagged files

Posted: Wed Nov 07, 2007 9:59 am
by xnview
garrem wrote:Hi, all. XnView is a great program! Merci, Pierre!

While trying to find a way to launch JAlbum from XnView, I found that XnView's "Open With" feature currently runs the specified command once for each tagged file. So, if 10 files are tagged, the command would get run 10 times, with a single filename as a parameter each time.

But in my case, it would be nice to have the command run only once, but given a list of all the tagged file names. That way, the external program can operate on all the files at once.

If many files are tagged, line/buffer length issues might occur. For this reason, might it be possible for XnView to create a temporary file containing a list of the file names, and then run the external command with that temporary file as an argument?

If this type of behavior would configurable with a few new check boxes in the "Add Program" dialog, this would be a very flexible way to interface with other programs.
Yes, perhaps better to make command line with all files than many times with only 1 file!