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
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.
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.
Summary: '::I can't find out what "-l" does.' The usual directory lister in unix is ls ; the -l option makes it list sizes, dates, owners etc, as well as filenames. -------------------- 'findstr /b /v "d" TLIS...
Summary: I wrote a batch file to retrieve data from a FTP server. Basically, it formats a temporary file which the batch then filters through checking to see if files already exist in a specific location befor...
Summary: untested ================================ :: checks to see if files in mylist got ftp'd :: if so, delets local files @echo off > ft.do echo o mysite.com >> ft.do echo user >> ft.do echo pass >> ft.do...