How retrieve source path to use in script

I create a button with a vbscript to move folders listed in txt file to another one.
But i have a problem, how retrieve {sourcepath} to use path in script ?

Pass it to the script via the command-line, like you would if you were running a normal program/exe.


Do you have an example ?

With this simple script...

@script vbscript
Msgbox SourcePath

Do you mean you're putting the script directly in the button (not calling a separate .VBS file)? That's only supported for rename scripts, which are given the path anyway via the rename function that Opus calls for each file.

Yes script is directly in the button... :frowning:

The easiest thing to do is move it into a separate .VBS file (e.g. in the /dopusdata/Scripts dir) and then you can call it with command-line args.

If you really want it in the button, you can use my "Abusing Rename Scripts" technique. There's a thread about it in the Rename Scripting forum. (Even then, though, I'd recommend getting the script to work as a separate .VBS first, then moving it later. It's a lot easier to write and test that way.)

ok, thanks for the tips.