Author Topic: Is there a ${focusfilepath} alternative that works for multiple selected files?  (Read 12908 times)

CMD

  • Newbie
  • *
  • Posts: 4
    • View Profile
For example, if I want a user defined command that adds a selected file or folder to a PeaZip archive, I can do:

"C:\(whatever)\PeaZip\peazip.exe" -add2folder "${focusfilepath}"

...and this works great when there's only a single file or folder selected, but with multiple files/folders selected, this does not work. For example, if I select A.txt, B.txt and C.txt and run the command, it will only add A.txt to the archive.  Is there something outside of MultiScript that works for multiple selected files/folders that I'm just not seeing, or do I need to use MultiScript for this?

CMD

  • Newbie
  • *
  • Posts: 4
    • View Profile
Or to put it another, simpler way, I'm looking for something that applies to no just the focused file, but all selected files.

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 514
    • View Profile
I think in this instance it is the fact that  "${focusfilepath}" is for a single item in scope, so you need to tell it to recurse the selection for an array of entries.

You could probably script a button then drop the files onto it with MS, maybe button +custom commands  (eg MC.Explorer.Selection.Select) will do it.