Computing.Net > Forums > Programming > FTP check to see if file exists

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FTP check to see if file exists

Reply to Message Icon

Name: gravz84 (by GRAVZ84)
Date: September 7, 2006 at 09:57:35 Pacific
OS: Win xp
CPU/Ram: 1 g
Product: xyz
Comment:

I am implementing an application using ftp to transfer files from ftp server to local location.
I want to see if a particular file exists before starting the download for all files.
I implement this simply by

"mget xyz*.*"

and then performing the check locally. However the program I am using called "Moveit freely" terminates if the file is not there!!
should I just use normal ftp, cos i tested it and it seems to be working fine even if file is not at ftp server.
or is there any other method to implement check file at ftp?
I read commands like "size file" but these are not present in the Moveit program.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: September 7, 2006 at 10:43:38 Pacific
Reply:

You could check for a file's presence on the server with the ftp built in to XP. But why not just use that, instead of checking with ftp and mgetting with Moveit?


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: siteforge (by Greg Apel)
Date: September 9, 2006 at 04:06:29 Pacific
Reply:

Are you writing a program? I ask, because the scope of this category is "programming".

If you are curious how to write FTP programs using wininet or winsock, that would be more aligned with this section.

I have written several FTP programs - and you can check the file size, file creation date, and everything else.


0

Response Number 3
Name: gravz84
Date: October 1, 2006 at 21:16:43 Pacific
Reply:

yes i am indeed writing a program..lol
thats why in this section.
i even wrote down how i was writing the program. ofcourse its calling an ftp application to do the necessary action.

anyway i did not find any good method to check for file presence on ftp so i just used mget with normal ftp.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: FTP check to see if file exists

ftp batch to download newest files www.computing.net/answers/programming/ftp-batch-to-download-newest-files/17252.html

Batch IF EXIST ... ELSE www.computing.net/answers/programming/batch-if-exist-else/15828.html

script to delete files after ftp www.computing.net/answers/programming/script-to-delete-files-after-ftp/18347.html