Running Script without DOS Command Prompt
Hi Everyone
I've managed to get WinSCP to correctly download files via FTP on Windows 10 using a script ran from Command Prompt but just want to check something.
Originally I had this script:
open ftp://USER:PASS@ftp.WEBSITE.co.uk
get "data.zip" "Z:\Software\File.zip"
bye
I saved the script into a text file. I thought I could just run it by selecting Open With WinSCP.com. That didn't work and came up with Host "Drive Script is located on" does not exist (i.e. Host "C" does not exist).
I then saved a bat file with this inside:
"C:\Program Files (x86)\WinSCP\winscp.com" /script=C:\Users\msn\Desktop\Script.txt
When I run the .bat file it then works perfectly.
So my question is why does MSDos have to initiate the script rather than it being run directly?
Hope that makes sense.
Cheers
Nick
I've managed to get WinSCP to correctly download files via FTP on Windows 10 using a script ran from Command Prompt but just want to check something.
Originally I had this script:
open ftp://USER:PASS@ftp.WEBSITE.co.uk
get "data.zip" "Z:\Software\File.zip"
bye
I saved the script into a text file. I thought I could just run it by selecting Open With WinSCP.com. That didn't work and came up with Host "Drive Script is located on" does not exist (i.e. Host "C" does not exist).
I then saved a bat file with this inside:
"C:\Program Files (x86)\WinSCP\winscp.com" /script=C:\Users\msn\Desktop\Script.txt
When I run the .bat file it then works perfectly.
So my question is why does MSDos have to initiate the script rather than it being run directly?
Hope that makes sense.
Cheers
Nick