Downloading files using GetFiles

Advertisement

ejw
Joined:
Posts:
3

Downloading files using GetFiles

Hi,
In a C# application I want to download one hidden file in a directory on a remote server.
If I try to download this file using ftp protocol and GetFiles(), an exception is generated: Exception thrown: 'WinSCP.SessionRemoteException' in WinSCPnet.dll. If I remove the hidden attribute on the remote server, everything works fine. How can I download hidden files on the remote server using C#?
Thanks in advance.

Reply with quote

Advertisement

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

Re: Downloading files using GetFiles

Please attach a full session log file for both scenarios (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. 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.

Reply with quote

ejw
Joined:
Posts:
3

Request logfile

Sir,
In the attachement I've included a logfile. Please not that
the file _mydocument.txt in the logfile is a file that has the hidden flag
(hidden file)
  • winscplog.txt (11.25 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: Request logfile

As you can see in the log, while the server includes the hidden file in a directory listing, it rejects its download. Looks like a bug to me.

I do not think that you can do anything about it. You should get the same problem with any other FTP client.

Reply with quote

ejw
Joined:
Posts:
3

Re: Request logfile

martin wrote:

As you can see in the log, while the server includes the hidden file in a directory listing, it rejects its download. Looks like a bug to me.

I do not think that you can do anything about it. You should get the same problem with any other FTP client.

OK, I thought it had something to do with the listing functionality in WinSCP.
maybe add option to skip downloading hidden files, or report hidden files being skipped?

Reply with quote

Advertisement

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

Re: Request logfile

ejw wrote:

OK, I thought it had something to do with the listing functionality in WinSCP.
maybe add option to skip downloading hidden files, or report hidden files being skipped?
But there's no way WinSCP can tell that the file is hidden. To WinSCP the file looks like any other.

Reply with quote

Advertisement

You can post new topics in this forum