Page 1 of 1

Deleting Multiple Files

Posted: Mon Jul 30, 2018 9:30 pm
by esantos
Hello,

I am trying to delete multiple files from a directory after download. When I enter the file name, I can delete it. I would like to know there is a function similar to mdel * .txt, for example.
I am trying to run the script through the tool that performs scheduled tasks. Below are the commands I'm using.

RushApp.FTP.Delete('FTP1','/notfis/Extracao/JOBS/notifis/', 'NOTFI0207100059793.txt',0);
[1] DELE /notfis/Extracao/JOBS/notifis/NOTFI0207100059793.txt
[1] 250 DELE command successful.

RushApp.FTP.Delete('FTP1','/notfis/Extracao/JOBS/notifis/', '*.txt',0);
[1] DELE /notfis/Extracao/JOBS/notifis/*.txt
[1] 550 The filename, directory name, or volume label syntax is incorrect.

Regards,

Re: Deleting Multiple Files

Posted: Fri Aug 03, 2018 2:03 pm
by FTP
OK, for the FTP command "DELE", you need to specify the detailed file path for the parameter, so you can traverse the directory and delete files one by one.