Solved

Deleting files from FTP - no errors in WorkSpace but files not deleted

  • 17 October 2016
  • 3 replies
  • 28 views

Badge +7

I'm using the FTPCaller to try and delete files on an FTP server. The translation log says "FTP: Deleted file 'ftp://<URL REDACTED>', total time: '0.281 seconds'" but when I refresh the directory in my FTP client, the file is still there.

The FTP client shows dfrw permissions for the file and I can delete it in the FTP client.

I've tried using upper and lower case versions of the file name with the same result.

Any ideas?

icon

Best answer by tim_wood 17 October 2016, 19:45

View original

3 replies

Badge +7

OK fixed it. When connecting to the FTP site, the login I use automatically goes to a particular sub-directory e.g. /stuff/data/exports. I then go into /stuff/data/exports/CSVs where the CSV files are. When using the FTPCaller to get files, I don't specify the full path, just ftp://ftpsite.tld/CSVs/example.csv. However it seems that when deleting a file, I have to specify the full path: ftp://ftpsite.tld/stuff/data/exports/CSVs/example.csv.

Sorry for posting then answering but maybe this will help others who get caught out like this.

Badge +7

OK fixed it. When connecting to the FTP site, the login I use automatically goes to a particular sub-directory e.g. /stuff/data/exports. I then go into /stuff/data/exports/CSVs where the CSV files are. When using the FTPCaller to get files, I don't specify the full path, just ftp://ftpsite.tld/CSVs/example.csv. However it seems that when deleting a file, I have to specify the full path: ftp://ftpsite.tld/stuff/data/exports/CSVs/example.csv.

Sorry for posting then answering but maybe this will help others who get caught out like this.

Forgot to say that the way I discovered this was by ticking "Log Debug" under Tools > FME Options > Translation

 

If the FTP path is wrong or the file is not there, an error is returned but...

 

A) It only appears in the log if you have "Log Debug" turned on.

 

B) It's logged as an INFORM message, not WARN or ERROR as you might expect.

 

This means that even if the file you are trying to delete is not found on the FTP site, the result comes out of the Output port with no error message, rather than the <rejected> port as I would expect. So I can't capture such errors and write them to a report file.

 

 

Badge
i have a same problem with FTPCaller when I try to delete oldest files on an FTP server.

 

There are no error in the log file after running the workbench, everything seems good, but the files are not physicaly deleted on my FTP server.

 

Any ideas or help?

 

 

Reply