Vb ftp file exists




















Calling list on the directory has the potential to be FAR more inefficient than using exceptions in this way. This appears to work on most ftp servers but not all.

One would have thought that the problem should be solved as follows:. Unfortunately it is a by design limitation big fat bug! See discussion and Microsoft response here. I'd recommend using the following WebRequestMethod instead, this works for me on all servers I tested, even ones which would not return a file size.

FtpWebRequest nor any other class in. NET does not have any explicit method to check a file existence. For example with WinSCP. Sign in to vote. User posted Hi, I'd like to use a simple switch to display one image or another but I need a way to find out if the image exists.

Monday, January 4, PM. Create fileUri request. Response If FtpStatusCode. End If. User posted Thanks, You're a legend! User posted Very good one to have The time now is AM. DevX Home. You may have to register before you can post: click the register link above to proceed.

To start viewing messages, select the forum that you want to visit from the selection below. My problem is that when I call this function many times the computer slows down. When this loop finishes and I want to call others wininet functions like FtpGetCurrentDirectory they also slows down my computer. But when I shut down and open the FTP session again the function executes as fast as before. Can you tell me what is happening???

The strangest think is that this code is faster than the previous. Any ideas why? Last edited by chrispl; at PM. Contact us.



0コメント

  • 1000 / 1000