Directory listing on SFTP site???

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Directory listing on SFTP site???Expand / Collapse
Author
Message
Posted 1/31/2008 1:38:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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

Post #40597
Posted 2/19/2008 3:26:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.

  Post Attachments 
code.txt (3 views, 5.20 KB)

Post #41090
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Hush, FTPplanet.com, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 11:09am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Enabled.