UncleSyd
We are currently developing a new application with SmartFTP library and we are seeing a problem that we cannot work out.
Our Application uploads a whole directory tree and it appears to have worked correctly. At some point later in the day these files need to be deleted via FTP so we have a function that recursively builds a list of all the files in the directories and then uses the Delete File function checking for FTPerror.FtpErrorSuccess. We are consistently seeing Errors in the delete function indicating that the File we are processing (strFile in the example code below) doesn’t exist, yet we have only just got a list of the files from the remote server. We also see FTPError {15} occasionally. In our test and live environments we are using Gene6 FTP V3.10.
DELETE FUNCTION
For each strFile in collFiles
If Not objFTPConn.DeleteFile(strFile) = enumError.ftpErrorSuccess Then
MsgBox("Unable to Delete File " & strFile)
GenericServices.WriteToLog(strFile, "Delete Failure", Now() - Now(), TransferType.Delete, 0, Me)
Else
collFiles.Remove(strFile)
End If
Next
We have noticed that during the upload of these files the SmartFTP connection seems to momentarily drop the connection and it is on these files that we have the error where the FTPListing says they exist yet when we delete them they appear not to.
When we come to delete the files and their respective folders later in the day, we get an error indicating that the directory is not empty yet no files exist except in the SmartFTP component. Can you shed some light on this possible error please?
Our Application uploads a whole directory tree and it appears to have worked correctly. At some point later in the day these files need to be deleted via FTP so we have a function that recursively builds a list of all the files in the directories and then uses the Delete File function checking for FTPerror.FtpErrorSuccess. We are consistently seeing Errors in the delete function indicating that the File we are processing (strFile in the example code below) doesn’t exist, yet we have only just got a list of the files from the remote server. We also see FTPError {15} occasionally. In our test and live environments we are using Gene6 FTP V3.10.
DELETE FUNCTION
For each strFile in collFiles
If Not objFTPConn.DeleteFile(strFile) = enumError.ftpErrorSuccess Then
MsgBox("Unable to Delete File " & strFile)
GenericServices.WriteToLog(strFile, "Delete Failure", Now() - Now(), TransferType.Delete, 0, Me)
Else
collFiles.Remove(strFile)
End If
Next
We have noticed that during the upload of these files the SmartFTP connection seems to momentarily drop the connection and it is on these files that we have the error where the FTPListing says they exist yet when we delete them they appear not to.
When we come to delete the files and their respective folders later in the day, we get an error indicating that the directory is not empty yet no files exist except in the SmartFTP component. Can you shed some light on this possible error please?