Discussion & Support for xplorer² professional
Moderators: fgagnon , nikos , Site Mods
admsupport
Bronze Member
Posts: 142 Joined: 2008 Dec 11, 00:18
Location: Japan
Post
by admsupport » 2009 Jan 10, 10:14
Hello
I wanted to save this command I use in the Script wizard (Ctrl+B) for re-use
Template:
Code: Select all
copy "$N" "sample $01.$E", del "$N"
Now, below is the way I have recorded it and the error message when I run it:
Copied as a user command
Description:
Code: Select all
$ copy "$N" "sample $01.$E", del "$N"
When I run it:
in the DOS address bar:
copy "Model Room 01.jpg" "Sample $01.jpg", del "Model Room 01.jpg" (so it should be fine?)
but in the dos window:
The syntax of the command is incorrect.
Is it a bad syntax in the description field?
nikos
Site Admin
Posts: 15892 Joined: 2002 Feb 07, 15:57
Location: UK
Contact:
Post
by nikos » 2009 Jan 10, 10:18
while in ctrl+B, press the preview button and see what the command to be executed looks like, this will give you the hint
Mr.Pleasant
Silver Member
Posts: 281 Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL
Post
by Mr.Pleasant » 2009 Jan 10, 11:33
Don't include "$" in the Script Wizard, as it is implied by the 'execute (DOS)' already.
Multiple commands separated by a comma don't work for the addressbar.
admsupport
Bronze Member
Posts: 142 Joined: 2008 Dec 11, 00:18
Location: Japan
Post
by admsupport » 2009 Jan 10, 13:12
Sorry, I rephrase it is not about SCRIPT WIZARD but about a USER COMMAND syntax:
I run this command IN the script wizard fine (first part of my post).
But I cannot run it when I record it as a USER COMMAND (see the end of my post, second CODE)
How do I have to record it?
I have tried many ways with $, without, everythime I have the same error message.
Mr.Pleasant
Silver Member
Posts: 281 Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL
Post
by Mr.Pleasant » 2009 Jan 10, 14:30
You cannot use the multiple commands syntax for that.
admsupport
Bronze Member
Posts: 142 Joined: 2008 Dec 11, 00:18
Location: Japan
Post
by admsupport » 2009 Jan 11, 01:41
Mr.Pleasant wrote: You cannot use the multiple commands syntax for that.
Okay I start to understand. I can only record ONE single command in the user commands on the Customize menu. When I try the following ("ren" instead "copy" + "del") that works, however the "$01" does not change?
The original file name "Text 2009.doc" was renamed "Sample $01.doc" but not "Sample 01.doc" as I expected.
Of course, I can do that using F2 (the renaming function), but I try to understand the user commands and the correct syntax to record them
nikos
Site Admin
Posts: 15892 Joined: 2002 Feb 07, 15:57
Location: UK
Contact:
Post
by nikos » 2009 Jan 11, 06:32
from the addressbar commands go only to the focused item, so even if you have 10 items selected only one will be treated. That's why counters like $01 don't make sense in this context, they are only for ctrl+B command scripts
having said that the latest v1.72 can apply the command to multiple selected files if you start it by $$ or >>
admsupport
Bronze Member
Posts: 142 Joined: 2008 Dec 11, 00:18
Location: Japan
Post
by admsupport » 2009 Jan 12, 16:36
nikos wrote:
having said that the latest v1.72 can apply the command to multiple selected files if you start it by $$ or >>
Thanks for the explanation, a double "$" or ">" was what I was missing. The explanation in the pdf manual makes sens now
And yes about CTRL+B, but I wanted to save a command for re-use.