Delete All Files In Folder - Forum

Forum Navigation
Don't miss out the new video tutorials in VisualNEO YouTube Channel!!
Please vote, comment and share them.
You need to log in to create posts and topics.

Delete All Files In Folder

Hi guys.... how do I delete all files in a Folder with button script? Doesn't matter what extention (.txt .exe .jpg etc) are in it. It must remove all the files in the Folder.

Thank You

A small example.


Andrei  (as3856).

Hi as3856...

Thank You for the example. I also know how to delete each file the same way as your example, but I thought there was another way. It would be better for me to Delete the Folder then and to Create a new Folder again. Think luishp and the team should think about a Action script to Clear a Folder in there next update.

Example: ClearFolder "[PubDir]NameList" "All"


You had a question about deleting files - my example deletes all the files in the folder, and if there are subfolders, they will not be deleted. Your answer is that you can delete the entire folder, and then create the same incorrect. , since other folders can be located in the deleted folder as well. Creating the update command to delete all files of the folder is considered superfluous, but adding some components (objects) would be nice - there are many different components in Delphi that would be useful in VisualNeo.


Andrei (as3856).

NeoDouble plugin

You can try using Windows CMD:

Run "del" "[PathName]\*.* /Q" "Wait+Hidden" "" ""

For more command line atributes for "del" command take a look here:

Best regards.

Thank you guys for the help. The one from luishp is just what I needed.


Open chat
Do you need more info?
Hi, do you have any doubt?
Powered by