Today, using code to delete the directory on the FTP server, error: The remote server returned errors: (550) The file is not available (for example, the file cannot be found, the file cannot be accessed).
The habitual Google, is the following points:
1.URL path is not correct, see if there are more spaces, or case problems
2. Is the authority sufficient?
3. When you need to connect repeatedly, such as getfilelist, you need to get all the files recursively, KeepAlive set to False, a query after the request is closed.
After doing the problem is still, very distressed!
Then on the FTP set up an empty directory, delete, unexpectedly can delete ....
Therefore, find the reason: Delete the directory, the directory cannot have files, must be empty.
That is, delete the directory, delete the file under the directory, and then delete the directory, note that the directory must exist on the first level directory!.
C # FTP remote server returned an error: (550) The file is not available (for example, the file was not found and the file could not be accessed)