I'm trying to build a macro that builds bat files from VBA and then runs the file.
The purpose of the bat file is to connect to download the file from a FTP
I am using winscp to connect and download files
I have the following code that works great for downloading files from a "sftp"
winscp.com /command "open sftp://name:Pasword@host:Port" "get garfieldand5.png ""D:\cmd invetory\""" "exit"
However when I try to download not from secured ftp
for example the code that I'm using is
winscp.com /command "open ftp://name:Pasword@host" "get /Inventory/Inbound/Jet.csv ""D:\cmd invetory\""" "exit"
It is not working properly and I get an error that
Unknown command "get /Inventory/Inbound/Jet.csv ""D:\cmd invetory\""" "exit"
When I just put in the following line winscp.com /command "open ftp://name:Pasword@host"
I am able to connect properly to the FTP the issue starts when I tried to download a file with the "get" method.
What am I doing wrong?
The purpose of the bat file is to connect to download the file from a FTP
I am using winscp to connect and download files
I have the following code that works great for downloading files from a "sftp"
winscp.com /command "open sftp://name:Pasword@host:Port" "get garfieldand5.png ""D:\cmd invetory\""" "exit"
However when I try to download not from secured ftp
for example the code that I'm using is
winscp.com /command "open ftp://name:Pasword@host" "get /Inventory/Inbound/Jet.csv ""D:\cmd invetory\""" "exit"
It is not working properly and I get an error that
Unknown command "get /Inventory/Inbound/Jet.csv ""D:\cmd invetory\""" "exit"
When I just put in the following line winscp.com /command "open ftp://name:Pasword@host"
I am able to connect properly to the FTP the issue starts when I tried to download a file with the "get" method.
What am I doing wrong?
Last edited by a moderator: