I am trying to write a routine that will delete all the files within an ftp folder.
The name of the files may change and so a specific one to remove specific names is no good.
Can anyone help please?
Delete all ftp files from a directory
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Use FTPGetDirList to get a list of files, then loop through it and do FTPDelFile for each one.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 82
- Joined: Mon Mar 24, 2014 12:15 pm
Re: Delete all ftp files from a directory
Following on from this one, I've just tried to search for files on a server using the FTPGetDirList and then output the result to MessageModal to see what I can find and all it says is:
Thanks in advance
Dominic Fichera
*UPDATE* Please disregard this post. I have found the local file with the information.
Any idea how to have it tell me the file names? I want to be able to create that loop to delete all files in the directory. also, the results say 2 files... There are 3 files in the directory. I have the search function set to Wildcard (*) and the type set to L.226-Options: -a -l
2 matches total
Thanks in advance

Dominic Fichera
*UPDATE* Please disregard this post. I have found the local file with the information.