Page 1 of 2
Embedding command line parameters
Posted: 04 Mar 2010 17:08
by HarryR
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 ?
Re: Embedding command line parameters
Posted: 04 Mar 2010 17:27
by serendipity
Select your .001 file and try this:
Code: Select all
run """Path to FFSJ.exe"" -Task=Join -Input=""<curitem>""";
Edit: Oh, you asked for POM, in which case it would be this:
Code: Select all
"Join files" 001>::run """Path to FFSJ.exe"" -Task=Join -Input=""<curitem>""";
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:04
by HarryR
Excellent, that's done it. Many thanks, serendipity.
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:20
by HarryR
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 ?
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:29
by serendipity
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 ?
Ok seems like run does not support ?:, maybe try openwith instead, like this:
Code: Select all
::openwith "?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:49
by admin
serendipity wrote: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 ?
Ok seems like run does not support ?:, maybe try openwith instead, like this:
Code: Select all
::openwith "?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe" "-Task=Join" "-Input=<curitem>"
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?
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:53
by HarryR
Perfect - thanks again, serendipity.
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:55
by HarryR
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?
I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:58
by serendipity
HarryR wrote: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?
I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?
He means a new command to resolve any ?: to actual path like c:.
@Don: may be Showpath? ResolvePath?
Re: Embedding command line parameters
Posted: 04 Mar 2010 18:59
by TheQwerty
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 for each direction: abs2rel and rel2abs.
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.
Re: Embedding command line parameters
Posted: 04 Mar 2010 19:04
by admin
HarryR wrote: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?
I'm not quite clear what you mean. Would such a function do more than the "?:" we refer to above ?
You could do something like this (air code obviously, not sure about that FFSJ syntax):
Code: Select all
+001>::run resolvepath("?:\Apps\Portable\FastFileSplitterJoiner\FFSJ.exe") . " " . quote("-Task=Join") . " " . quote("-Input=<curitem>")
Re: Embedding command line parameters
Posted: 04 Mar 2010 19:44
by Stefan
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?
And i think
<xydrive> is missing from XYplorer Native Variables.
<xydrive> current drive letter XY runs from right now.
Re: Embedding command line parameters
Posted: 04 Mar 2010 19:52
by admin
Stefan wrote: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?
And i think
<xydrive> is missing from XYplorer Native Variables.
<xydrive> current drive letter XY runs from right now.
Yes, that would help in the OP's case. Will add it.
Re: Embedding command line parameters
Posted: 04 Mar 2010 23:35
by RalphM
And could <xydrive> then be usable in the TitleBarTemplate as well, please?
Re: Embedding command line parameters
Posted: 05 Mar 2010 07:24
by admin
RalphM wrote:And could <xydrive> then be usable in the TitleBarTemplate as well, please?
Why?
Actually I could make the make the titlebar fully XY-var aware. Would that be interesting?