Check if file exists on ftp server (1 Viewer)

macca the hacke

Macca the Hacca
Local time
Today, 03:22
Joined
Dec 1, 2005
Messages
221
Hi

Is there a simple way to check for the existence of a file on a ftp server?

I have tried searching posts but cannot find anything to do this - maybe just not looking hard enough!!

cheers:confused:
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 03:22
Joined
Sep 12, 2006
Messages
15,692
i have just done something similar.

what i did was generated a script to collect a directory listing - eg ls * mylisting.txt. ls is better than dir, as ls just gives file names, then did a mget * to get all the files.

i then loaded the file names from the listing into an array, and checked that i had collected them all.

then i generated a new script to delete them all, one at a time.

---------
i suspect if you use wininet you can get it more interactive, but i havent started to look at wininet yet.

i'm using scripting code i got mainly form this site.

---------
so from your point of view, just do an ls to collect the listing, then see if the file you want is in the listing.
 

Users who are viewing this thread

Top Bottom