| | | Forum Newbie
       
Group: Forum Members Last Login: 2/1/2008 8:34:15 PM Posts: 1, Visits: 5 |
| Hi all,
Can any of you elaborate on how to scan through the files on a remote directory using filemask. For example If I only wanted to get all *.csv files from a remote directory on an SFTP site.
The following code always lists all the files from the remote directory, where as I need only *.csv files.
pConn = pApi.CreateConnection(str_FTPlocation, str_FTPUsername, srr_FTPPassword, WsftpConnectionTypes.WSFTP_CT_SFTP, 22)
pFolder = pConn.GetFolder("*.csv", str_FTPDirectory)
filecount = pFolder.Count
Is this a bug or am I doing something wrong? Please share your thoughts.
Thanks
Karthik
|
| | | | Forum Newbie
       
Group: Forum Members Last Login: 2/20/2008 7:33:46 AM Posts: 3, Visits: 4 |
| | Hi, We had similar problems. Attached is code we built to extract data. Seemed like if we did a chg dir followed by a get curr folder followed by a refresh (which looked like a get curr folder under the covers) we got what we needed. According to specs you shouldn't have to do this sequence; but it works. good luck.
|
| |
|
|