Error on Put Command.

Advertisement

PMORRISON
Joined:
Posts:
4
Location:
L.I. NY

Error on Put Command.

Using verison 5.17.6
Using a bat file to automate a file transfer to a ftp site.
 "put ""test-ftp.txt"" E:/municity data/"^
 "exit"
the file is locate on a drive e: on my server
I keep getting an error that the file or folder doesn't exist.
error: from log file< 2020-07-06 10:43:42.008 Script: Active session: [1] HuntingtonTownNY@ftp.municitytest.com
> 2020-07-06 10:43:42.008 Script: put "test-ftp.txt" E:/municity data/
. 2020-07-06 10:43:42.008 Copying 2 files/directories to remote directory "data/" - total size: 0
. 2020-07-06 10:43:42.008 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2020-07-06 10:43:42.008 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; EncryptNewFiles: Yes; ExcludeHiddenFiles: No; ExcludeEmptyDirectories: No; InclM: ; ResumeL: 0
. 2020-07-06 10:43:42.008 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
* 2020-07-06 10:43:42.008 (EOSError) System Error. Code: 2.

* 2020-07-06 10:43:42.008 The system cannot find the file specified
. 2020-07-06 10:43:42.008 Asking user:
. 2020-07-06 10:43:42.008 File or folder 'test-ftp.txt' does not exist. ("System Error. Code: 2.

. 2020-07-06 10:43:42.008 The system cannot find the file specified")
< 2020-07-06 10:43:42.008 Script: File or folder 'test-ftp.txt' does not exist.
< 2020-07-06 10:43:42.008 Script: System Error. Code: 2.

< 2020-07-06 10:43:42.008 The system cannot find the file specified
* 2020-07-06 10:43:42.008 (ESkipFile) File or folder 'test-ftp.txt' does not exist.
* 2020-07-06 10:43:42.008 System Error. Code: 2.
* 2020-07-06 10:43:42.008 The system cannot find the file specified
. 2020-07-06 10:43:42.008 Copying finished: Transferred: 0, Elapsed: 0:00:00, CPS: 0/s
. 2020-07-06 10:43:42.008 Script: Failed
. 2020-07-06 10:43:42.008 Script: Exit code: 1
. 2020-07-06 10:43:42.039 Disconnected from server

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Error on Put Command.

The put command has this syntax:
put source dest
See https://winscp.net/eng/docs/scriptcommand_put
You seem to somehow specify source paths in two separate parameters.

You also have the quotes wrong:
https://winscp.net/eng/docs/commandline#syntax

Did you want to do this?
"put ""E:\municity data\test-ftp.txt"" ""/some/remote/path/"""

Regarding the multiple files: Yes, you can use multiple put commands.
Or a single put with a list of files or a file mask: https://winscp.net/eng/docs/file_mask

Reply with quote

Advertisement

You can post new topics in this forum