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

jsp.net

Session session = new Session();
TransferOptions transferOptions = new TransferOptions();

transferOptions.FileMask = "Your File Mask";

session.Open(Your Connection);
session.GetFiles(remotePath, localPath, false, transferOptions);
tkennedy

Code Snippet?

jsp.net wrote:

Ok. I found what I was doing wrong. I needed to set the FileMask property in the TransferOption class and then pass the transfer option to the Session.GetFile method. After doing this it transferred the desired files, located by the file mask, to the appropriate local directory.


Would you be so kind as to post snippet of what you did? I've been trying to do this same thing for some time now.
jsp.net

Ok. I found what I was doing wrong. I needed to set the FileMask property in the TransferOption class and then pass the transfer option to the Session.GetFile method. After doing this it transferred the desired files, located by the file mask, to the appropriate local directory.
jsp.net

Thanks for the advice. I went ahead and Set the SessionLogPath and did so before calling the Open method, but it throws an exception saying cannot open Log: C:\Temp\directory. Would this indicate that the connection is at fault. I have it to where a user logs in and their username and password and other connection options are stored in a session. I then reuse this session when another event(button click) occurs. This is the point that I am at so far. Sorry, hope this makes sense, I am a little new to programming.
martin

Re: File Mask in remote path

Your mask it correct. Please post a complete session log file showing the problem (set Session.SessioLogPath).

Nb, Session.FileExist (singular) does not support file masks.
jsp.net

File Mask in remote path

I am trying to use the GetFile method to retrieve specific files in a directory, but have been unsuccessful. Then tried the FileExists method and it comes back false. I know the files exists b/c when I manually connect and navigate to the directory and use the file mask, the files are there. I don't know if it's something with the file mask I am using. Again, I used this file mask on the directory manually and it shows the files I need. Any help would be much appreciated.

Example of remote path:

/remote/file/path/*_something<2013-05-10>2013-05-08