Topic "Different behaviour on "ls" command"

Author Message
Rocco Ventura

Guest


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
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License