Multi Commander Support Forum

Multi Commander => Script => Topic started by: Matthias515566 on May 21, 2025, 17:50:10

Title: Open multiple files
Post by: Matthias515566 on May 21, 2025, 17:50:10
I use "C:\Program Files\XnViewMP\xnviewmp.exe" "${focusfilepath}" to open the focused file with XnView. That doesn’t work for multiple selected files. How can I do that for multiple selected files?
Title: Re: Open multiple files
Post by: Mathias (Author) on May 21, 2025, 22:11:56
Use MultiScript and get all selected files, and loop and call it each..

Or if it is CustomCommands type.. you can enable option for that command to 'run command separately for each selected files/folder'
Title: Re: Open multiple files
Post by: Matthias515566 on May 22, 2025, 21:33:08
Use MultiScript and get all selected files, and loop and call it each..

Or if it is CustomCommands type.. you can enable option for that command to 'run command separately for each selected files/folder'
But "FocusFilePath" only uses the file that is currently in focus, not all selected files.
I guess I need a different command for that.
Title: Re: Open multiple files
Post by: Mathias (Author) on May 22, 2025, 21:49:37
If you enable that option for the script, it will be run once for each file that is selected.
and for each iteration {FocusFilePath} will be the next file of all the selected.
Title: Re: Open multiple files
Post by: Matthias515566 on May 24, 2025, 20:18:40
This doesn't work. I guess I have to learn how to do multi-scripting, or you could give me a working example.
Title: Re: Open multiple files
Post by: Mathias (Author) on May 25, 2025, 00:18:57
What script type is it?
Title: Re: Open multiple files
Post by: Matthias515566 on May 25, 2025, 11:33:18
It is a "External" Script. A very simple command:
Code: [Select]
"C:\Program Files\XnViewMP\xnviewmp.exe" "${focusfilepath}"
Title: Re: Open multiple files
Post by: Mathias (Author) on May 25, 2025, 22:14:01
ahh Ok. I not sure that option is supported for that.