Embedding command line parameters
-
HarryR
- Posts: 7
- Joined: 25 Jun 2009 19:20
Embedding command line parameters
In an attempt to get rid of the ugly 7zip and find something else that can join .001 files, I am trying to use a little utility call FFSJ, which I found at http://www.jaist.ac.jp/~hoangle/filesj/
As part of trying to make a totally portable flashdrive, I am trying to get XYPlorer to use FFSJ in command-line mode when I double-click a file with the extension .001.
The FFSJ site gives the command-line example of :
FFSJ.exe "-Task=Join" "-Input=c:\test\SP\LargeFile.dat.001"
I've been trying to do this with XYPlorer's portable file associations or scripts, but I can't see a way to get XY to pass the name of the file I click on into the command. I've tried replacing c:\test\SP\LargeFile.dat.001 with %1, but XY isn't having it.
Can anyone suggest a way to do this ?
As part of trying to make a totally portable flashdrive, I am trying to get XYPlorer to use FFSJ in command-line mode when I double-click a file with the extension .001.
The FFSJ site gives the command-line example of :
FFSJ.exe "-Task=Join" "-Input=c:\test\SP\LargeFile.dat.001"
I've been trying to do this with XYPlorer's portable file associations or scripts, but I can't see a way to get XY to pass the name of the file I click on into the command. I've tried replacing c:\test\SP\LargeFile.dat.001 with %1, but XY isn't having it.
Can anyone suggest a way to do this ?
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Embedding command line parameters
Select your .001 file and try this:
Edit: Oh, you asked for POM, in which case it would be this:
Code: Select all
run """Path to FFSJ.exe"" -Task=Join -Input=""<curitem>""";Code: Select all
"Join files" 001>::run """Path to FFSJ.exe"" -Task=Join -Input=""<curitem>""";-
HarryR
- Posts: 7
- Joined: 25 Jun 2009 19:20
Re: Embedding command line parameters
Excellent, that's done it. Many thanks, serendipity.
-
HarryR
- Posts: 7
- Joined: 25 Jun 2009 19:20
Re: Embedding command line parameters
Whoops, one further question: it's working with the Portable File Association :
+001>::run "L:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
but when I try to replace the L: with ?:, it can't handle it.
Is there any way to make this sort of script drive letter-neutral ?
+001>::run "L:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
but when I try to replace the L: with ?:, it can't handle it.
Is there any way to make this sort of script drive letter-neutral ?
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Embedding command line parameters
Ok seems like run does not support ?:, maybe try openwith instead, like this:HarryR wrote:Whoops, one further question: it's working with the Portable File Association :
+001>::run "L:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
but when I try to replace the L: with ?:, it can't handle it.
Is there any way to make this sort of script drive letter-neutral ?
Code: Select all
::openwith "?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"-
admin
- Site Admin
- Posts: 66347
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Embedding command line parameters
It might be useful to add a function to scripting that resolves a portable or relative path. Not sure how to call it. Any ideas?serendipity wrote:Ok seems like run does not support ?:, maybe try openwith instead, like this:HarryR wrote:Whoops, one further question: it's working with the Portable File Association :
+001>::run "L:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
but when I try to replace the L: with ?:, it can't handle it.
Is there any way to make this sort of script drive letter-neutral ?Code: Select all
::openwith "?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
FAQ | XY News RSS | XY X
-
HarryR
- Posts: 7
- Joined: 25 Jun 2009 19:20
Re: Embedding command line parameters
Perfect - thanks again, serendipity.
-
HarryR
- Posts: 7
- Joined: 25 Jun 2009 19:20
Re: Embedding command line parameters
I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?admin wrote: It might be useful to add a function to scripting that resolves a portable or relative path. Not sure how to call it. Any ideas?
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Embedding command line parameters
He means a new command to resolve any ?: to actual path like c:.HarryR wrote:I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?admin wrote: It might be useful to add a function to scripting that resolves a portable or relative path. Not sure how to call it. Any ideas?
@Don: may be Showpath? ResolvePath?
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Embedding command line parameters
If you want one for each direction: abs2rel and rel2abs.admin wrote:It might be useful to add a function to scripting that resolves a portable or relative path. Not sure how to call it. Any ideas?
If you want one with a switch: ResolvePath.
Could also be useful if there were a command or xy-var to retrieve the drive letter based on the volume label or serial number.
-
admin
- Site Admin
- Posts: 66347
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Embedding command line parameters
You could do something like this (air code obviously, not sure about that FFSJ syntax):HarryR wrote:I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?admin wrote: It might be useful to add a function to scripting that resolves a portable or relative path. Not sure how to call it. Any ideas?
Code: Select all
+001>::run resolvepath("?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe") . " " . quote("-Task=Join") . " " . quote("-Input=<curitem>")FAQ | XY News RSS | XY X
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: Embedding command line parameters
And i think <xydrive> is missing from XYplorer Native Variables.admin wrote:It might be useful to add a function to scripting that resolves a portable or relative path.
Not sure how to call it. Any ideas?
<xydrive> current drive letter XY runs from right now.
-
admin
- Site Admin
- Posts: 66347
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Embedding command line parameters
Yes, that would help in the OP's case. Will add it.Stefan wrote:And i think <xydrive> is missing from XYplorer Native Variables.admin wrote:It might be useful to add a function to scripting that resolves a portable or relative path.
Not sure how to call it. Any ideas?
<xydrive> current drive letter XY runs from right now.
FAQ | XY News RSS | XY X
-
RalphM
- Posts: 2089
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: Embedding command line parameters
And could <xydrive> then be usable in the TitleBarTemplate as well, please?
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
admin
- Site Admin
- Posts: 66347
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Embedding command line parameters
Why?RalphM wrote:And could <xydrive> then be usable in the TitleBarTemplate as well, please?
Actually I could make the make the titlebar fully XY-var aware. Would that be interesting?
FAQ | XY News RSS | XY X
XYplorer Beta Club