Skip to main content
Solved

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

  • October 17, 2016
  • 3 replies
  • 236 views

tim_wood
Contributor
Forum|alt.badge.img+8

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?

Best answer by tim_wood

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.

View original
Did this help you find an answer to your question?

3 replies

tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • Best Answer
  • October 17, 2016

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.


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • October 18, 2016
tim_wood wrote:

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.

 

 


Forum|alt.badge.img
  • April 27, 2018
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?

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings