Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

You cannot retrieve the listing using WinSCP scripting, if WinSCP cannot parse the listing. Unless you parse the log file youself.
What exactly do you want to achieve by "getting the file name by cli [scripting]"?
JimmyJingle

Got it,
I wonder, since winscp log can show the file name, is it possiable I can got the file name by cli ?

Thanks
martin

Re: can not download file, but file can shows in log

WinSCP probably does not understand the unusual directory listing format of your FTP server.
JimmyJingle

can not download file, but file can shows in log

Hello,

winscp Version : 5.15.4

Try to script download FTP files by use "get *" command, then I got "Script: No file matching '*' found".
Try use cli, same problem, can not see the file in cli, but can see the file in log.
The file name is simple, does not contains special characters, it like "MB11111".

If use windows FTP client, i can see files, and I can download files sucessfully.
I like to use winscp not windows FTP client, Is there any clue can fix this ?

Thanks in advance

> 2020-04-20 23:50:09.937 Script: get /RECEIVE/*
. 2020-04-20 23:50:09.937 Retrieving directory listing...
> 2020-04-20 23:50:09.937 CWD /RECEIVE
< 2020-04-20 23:50:10.187 250 "receive" is current directory.
> 2020-04-20 23:50:10.187 PWD
< 2020-04-20 23:50:10.453 257 "receive" is current directory.
> 2020-04-20 23:50:10.453 TYPE A
< 2020-04-20 23:50:10.718 200 Type set to A.
> 2020-04-20 23:50:10.718 PASV
< 2020-04-20 23:50:10.984 227 Entering Passive Mode ()
> 2020-04-20 23:50:10.984 LIST
. 2020-04-20 23:50:10.984 Connecting to xxx ...
< 2020-04-20 23:50:11.515 150 Data connection open for transfer of file
. 2020-04-20 23:50:11.515 Data connection closed
. 2020-04-20 23:50:11.515 Sender ILOG IC Control# Sent (GMT) Mfile
. 2020-04-20 23:50:11.515 xxxx 11111111111 111 20APR20|11:47 M444444
< 2020-04-20 23:50:11.781 226 Closing data connection. Requested file action successful.
. 2020-04-20 23:50:11.781 Directory listing successful
. 2020-04-20 23:50:11.781 ..;D;0;1899-12-30T08:00:00.000Z;0;"" [0];"" [0];---------;0
< 2020-04-20 23:50:11.781 Script: No file matching '*' found.
. 2020-04-20 23:50:11.781 Copying 0 files/directories to local directory "F:\ftp\in" - total size: 0
. 2020-04-20 23:50:11.781 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2020-04-20 23:50:11.781 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; EncryptNewFiles: Yes; ExcludeHiddenFiles: No; ExcludeEmptyDirectories: No; InclM: ; ResumeL: 0
. 2020-04-20 23:50:11.781 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2020-04-20 23:50:11.781 Copying finished: Transferred: 0, Elapsed: 0:00:00, CPS: 0/s
> 2020-04-20 23:50:11.781 Script: exit
. 2020-04-20 23:50:11.781 Script: Exit code: 0