Deleting Multiple Files

Please post here if you have problems in using FTP Rush.
Post Reply
Posts: 1
Joined: Mon Jul 30, 2018 9:12 pm

Deleting Multiple Files

Post by esantos »


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.

Site Admin
Posts: 1917
Joined: Tue Sep 29, 2009 6:09 am

Re: Deleting Multiple Files

Post 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.
Post Reply