Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Re: Different behaviour on "ls" command

Please attach a full session log files from both servers.

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Rocco Ventura

Different behaviour on "ls" command

Hi to all of you.

I'm using WinSCP with script commands to list e get files from different FTP; simple-ones (in Unix/Linux
and also Windows server) and also SFTP.

I've found a different behaviour in ls command: the usual output of this command is like the following rows:

Searching for host...
Connecting to host...
Authenticating...
Using username "remotexxx".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] remotexxx@sftp.xxx.com
failonnomatch off
confirm off
batch continue
reconnecttime 120
/wms/outbound
-r--r--r-- 0 user group 6394 May 11 11:55:00 2017 products_20170511095500_000001.csv

I've learned that to catch only the remote filenames I have to truncate the first 64 chars of the line; in the example above when the "product...*.csv" starts.

But in a Unix/Linux server I have to truncate the first 56 chars (9 less), because the output of ls command is like...

---------- 0 633344 May 16 7:00 XMOVIM-2017-05-16 06-00-42.xls

So... the lines from ls command, in different FTP-servers are different.

Here the 2 lines together...

-r--r--r-- 0 user group 6394 May 11 11:55:00 2017 products_20170511095500_000001.csv
---------- 0 633344 May 16 7:00 XMOVIM-2017-05-16 06-00-42.xls

I hope you undestood the problem.

Thanks

Bye

Rocco