Uploading Issue!!

May 1, 2008 at 6:57 PM
I'm trying to upload a newer version of an existing file to the remote server like this -

if (nftp.IsFileExists(Path.GetFileName(destURL)))
{
if (nftp.DeleteFile(Path.GetFileName(destURL)))
{
if (nftp.UploadFile(srcURL, destURL))
{
File.Delete(srcURL);
}
}
}

So that basically deletes the older file from the server and uploads the newer version and deletes the newer version from the local server.

When I run that code, it gives me this error - Remote file is already exists - it is strange because when I check the remote server it DOES delete the file but somehow it thinks that the file still exists.

Any ideas?