Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

xylene

Re: Command line parameters not passed by script

Thank you SO MUCH!
xylene
xylene

Command line parameters not passed by script

I have a simple script that connects nicely to my remote server to make a remote directory. I cannot figure out how to get WinSCP to read the /parameter for the directory name. All the instruction on using /parameter I get from the documentation is:
put "%1%"

My script is:
open sftp://blahblahblah
lcd C:\wamp64\www\VMan4
cd /home/vmn/vman.com
mkdir %1%
exit

My command line looks like:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\Users\xylen\Desktop\Programming\WinSCP.log" /ini=nul /script="C:\Users\xylen\Desktop\Programming\WinSCP_Script.txt" /loglevel=0 /parameter="VMTst"

It creates a directory named %1%. I've tried every combo of % and " that I can think of. Any tips are welcome.
This is a Windows 11 machine using WinSCP 5.21.6
Thanks!
Xylene