Options

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: Any updates on this?

Ken Rokos wrote:

I just started using EnumerateRemoteFiles and it shows the listing twice in the WinSCP log (set using $session.SessionLogPath = 'C:\WinSCPLog.txt'). It would be nice to suppress this in the log so I don't have a huge log every time I run this. $InvFiles = $session.EnumerateRemoteFiles($SourcePath, $InvFilter, [WinSCP.EnumerationOptions]::None)where$InvFilter is$InvFilter = 'INV*.dat' There are only a few INV files in the directory. This is not what this thread is about. Anyway, did you try to enable reduced logging? $session.AddRawConfiguration("Logging\LogProtocol", "-1")
Ken Rokos

I just started using EnumerateRemoteFiles and it shows the listing twice in the WinSCP log (set using $session.SessionLogPath = 'C:\WinSCPLog.txt'). It would be nice to suppress this in the log so I don't have a huge log every time I run this. $InvFiles = $session.EnumerateRemoteFiles($SourcePath, $InvFilter, [WinSCP.EnumerationOptions]::None)where$InvFilter is\$InvFilter = 'INV*.dat'

There are only a few INV files in the directory.
martin

## Re: Log files

I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
sdt99

## Second log file

Only one attachment per posting - here's the log with directory listing disabled at the FTP server.

BTW apologize for the delay responding - I was away over the holidays.
sdt99

## Log files

Here is the script:

option confirm off
get ws_bdy.txt
put 000001000001.cfs
exit

I have attached log files for two cases - one where the directory listing has been disabled at the FTP server (the file download works fine) and another where directory listing has been enabled at the server. I had to kick the user and truncate the log otherwise there would have been millions of files listed. I think you can still see the difference between the logs - in both cases winscp is sending the MLSD command (which I don't want and would like to disable).
martin

## Re: I am having same problem (WinSCP, Version 5.15.9 (Build 10071))

sdt99 wrote:

I want to upload / download files using ftps - I don't want overwrite warnings - just transfer the files. I'm using a script like this:

open ftps://.....
option confirm off
get filename1.txt
put filename2.txt
exit

There are over 1 million files in the FTP root - I would like to disable the directory listing but I don't know how to do this.

To generate the session log file, use /log=C:\path\to\winscp.log 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.
sdt99

## I am having same problem (WinSCP, Version 5.15.9 (Build 10071))

I want to upload / download files using ftps - I don't want overwrite warnings - just transfer the files. I'm using a script like this:

open ftps://.....
option confirm off
get filename1.txt
put filename2.txt
exit

There are over 1 million files in the FTP root - I would like to disable the directory listing but I don't know how to do this.
lurker
I have upgraded version and that helped, shame on me.
Thanks a lot!
martin

## Re: Skip remote directory listing

If you are already, and still get this behavior, please attach a full session log file showing the problem (using the latest version of WinSCP).

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.
lurker

## Skip remote directory listing

Hi!

I'm using script to upload files, it looks like this:

open ftp://.....
option confirm off
put "D:\test.txt" /test.txt
exit

So nothing special here, just connect and upload file.
The problem is that WinSCP always executes LIST command before file upload.
Remote directory contains 70000+ files and my download speed with that server is very low (but upload is very fast).
So in order to upload 1 tiny file my script have to wait for a few minutes to get the unnecessary directory listing.

Is there any way to skip that step?