Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all! Im downloading files from an FTP server. The problem is multiple downloads or a filename* download. I don't have the exact filename with me. The filename consists of an ID followed by date and time. I have the ID but the data and time can be random. How do I download a file without knowing the exact file name. The wildcard character * also does not work. Can

anybody please help! Thanks in advance!

  • *Experts*
Posted

You can issue commands to FTP servers to get a file listing. Depending on the server (NT vs. Unix for example), you may get away with "dir" thought "lst" (I think) is the standard FTP command. I haven't tried this with .NET but I know "back in the day" what got returned was a big string showing the directory contents. You can then find the filenames and do your own string compare to get the real filename.

 

It's a start if nothing else works.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...