Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.8k views
in .NET FTP by (200 points)
I am using edtftpnet for ftp using dotnet.

1. How to check if file exists on ftp server?.
2. How to check if the connection is made to ftp server.

4 Answers

0 votes
by (162k points)
1. Use DirDetails or Size
2. If an exception is not thrown when Connect() is called, it succeeded.

I am using edtftpnet for ftp using dotnet.

1. How to check if file exists on ftp server?.
2. How to check if the connection is made to ftp server.
0 votes
by (200 points)
1. Use DirDetails or Size
2. If an exception is not thrown when Connect() is called, it succeeded.

I am using edtftpnet for ftp using dotnet.

1. How to check if file exists on ftp server?.
2. How to check if the connection is made to ftp server.


------------------------------------------------------------------------------------
Thanks for the prompt reply.
I tried using Size property - It gives me error that This is not a standard FTP command.
I checked in the edtftpnet document there it is mentioned - Get the size of a remote file. This is not a standard FTP command, it is defined in "Extensions to FTP", a draft RFC (draft-ietf-ftpext-mlst-16.txt) . What is this "Extensions to FTP".
Please let me know.

If I use DIR it gives me if files are present in that directory. I want to know if a specific file()with specific filename) exists or not.

Is there any other easier way to find out if a particular file exists on the ftp server.


Also DirDetails lists a directory's contents as an array of strings. I wanted to know how to find out if a particular file exists.
0 votes
by (200 points)
Is there a way to find out directly if a particular file exists on the ftp server other than DirDetails?.
DirDetails gives a list of filenames present in the ftpserver directory.
I needed to find out if a particular file exists in a particular directory.



1. Use DirDetails or Size
2. If an exception is not thrown when Connect() is called, it succeeded.

I am using edtftpnet for ftp using dotnet.

1. How to check if file exists on ftp server?.
2. How to check if the connection is made to ftp server.


------------------------------------------------------------------------------------
Thanks for the prompt reply.
I tried using Size property - It gives me error that This is not a standard FTP command.
I checked in the edtftpnet document there it is mentioned - Get the size of a remote file. This is not a standard FTP command, it is defined in "Extensions to FTP", a draft RFC (draft-ietf-ftpext-mlst-16.txt) . What is this "Extensions to FTP".
Please let me know.

If I use DIR it gives me if files are present in that directory. I want to know if a specific file()with specific filename) exists or not.

Is there any other easier way to find out if a particular file exists on the ftp server.


Also DirDetails lists a directory's contents as an array of strings. I wanted to know how to find out if a particular file exists.
0 votes
by (162k points)
That really is one of the easiest ways.

Is there a way to find out directly if a particular file exists on the ftp server other than DirDetails?.

Categories

...