Multi Commander > Script

Passing command arguments from command line bar to user defined batch script

(1/2) > >>

mmg:
Passing command arguments from the command line bar to a user defined batch script does not seem to work.
I wrote a small user defined batch script:

echo arg=${param:0}
pause

After assigning alias "ttt" to the batch script I entered "ttt 123" on the command line bar. Result:
arg=
Press any key ...

Can command line arguments only be passed to Multi-Scripts?

Mathias (Author):
Why not just call the bat script directly from alias.. and the parameters from the command line is sent as parameters to the bat file..
and windows will pick them up and you can access them as normal in batch script using %1 and so on

Most multitags should work in bat too, but since they are handle before the command is executed Im not sure parameters from commandline field will work.
feels like the wrong way to do something.

mmg:
If command line arguments cannot be passed over I will have to seperate my batch scripts from Multicommander. So far, defining batch scripts inside Multicommander seemed to be a practical all-in-one solution for me, handling all the different types of user defined commands in a similar way.

I suggest to adapt the manual (http://multicommander.com/docs/UDC_batch, "Command Arguments").

Mathias (Author):
What are you trying to do..  I can't see a valid use case for it
Are the bat script interacting with MC in some other way ? or is it just the command line parameters you want ?
I'm trying to figure out what you want to do. I think there are better way of doing them.

mmg:
For example navigating to a target directory and running "git clone", passing over the git repo path via the command line.

Navigation

[0] Message Index

[#] Next page

Go to full version