Computing.Net > Forums > Unix > FTP Remote file existence check

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 Remote file existence check

Reply to Message Icon

Name: wariomaster
Date: March 27, 2007 at 09:09:51 Pacific
OS: UNIX
CPU/Ram: Unknown
Product: IBM
Comment:

My script connects to a remote server via ftp command. I would like it to check for the existence of a file while there and possibly send back a (return code) value for my script to check and determine next step based on whether or not the file exists.

Thank you.

Gina Santiago



Sponsored Link
Ads by Google

Response Number 1
Name: wollie
Date: March 29, 2007 at 02:31:57 Pacific
Reply:

Hi Gina,

you can't check it directly via FTP commands.
One approach would be to ftp to the server, make a directory listing and pipe the output to a logfile and analyse that logfile.
If you receive a positive match, do a second ftp to delete the file.

cheers

Wollie


0
Reply to Message Icon

Related Posts

See More


gunzip question Extraction Issue



Post Locked

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


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: FTP Remote file existence check

check file existence on remote serv www.computing.net/answers/unix/check-file-existence-on-remote-serv/7212.html

Check Multiple File Exists www.computing.net/answers/unix/check-multiple-file-exists/4775.html

chmod after ftp a file www.computing.net/answers/unix/chmod-after-ftp-a-file/4575.html