Thanks a lot it worked now. Appreciate your help.
You need to wrap any path with spaces to double quotes (it does not harm to wrap any path to double quotes).
I.e. lcd "D:\MY FTP\Upload"
Thanks Martin. I use "lcd D:\FTP\Upload" and it works fine.
But when I change it to the folder name with space it provides error message Too many parameters for command 'lcd'. For example, it provides error message for "lcd D:\MY FTP\Upload". Is there anyway, I can include folder/directory with space?
For you information, I am using WinSCP Portable application (v5.5.4.0).
Just use a full path to the file:
put D:\FTP\Upload\test.txt
Or change local working directory to D:\FTP\Upload
. Either before starting WinSCP or from WinSCP script using lcd D:\FTP\Upload
.
Hi Team,
I am new to WinSCP. I use following script and it works fine to upload test.txt file exists in "winscp554" directory. I want to upload file from local directory "D:\FTP\Upload" instead of "C:\winscp554". Would you please guide me in proper direction?
I am using WinSCP product version 5.5.4.0. Please let me know if you require more info. Thanks in Advance.
C:\winscp554>WinSCP.com /script=FTP_Upload.txt
--------------- FTP_Upload.txt -----------
option batch abort
option confirm off
open sftp://user:password@example.com/
put test.txt
exit
------------------------------------------