Posted: 2008-01-18 20:50
I have a .bat file that is calling winscp with a /script. The script needs to upload a file through SFTP. I would like to be able to pass the file name that is to be uploaded via the command line. I see in the FAQ (https://winscp.net/eng/docs/scripting#quotes) where this is addressed if the file name has spaces in it; however, my files do not have spaces in it so I was hoping that the steps addressed on this page were not necessary and there was an easier way to accomplish this. If it can be passed as a command line parameter, can you say what the parameter would be as well as how to pick up that parameter value within the script itself (is it %1?)
Thanks so much
Location: Prague, Czechia
Parameters cannot be passed into script. But you can setup complete script on command line using /command parameter.
You can post new topics in this forum
And it's free!