Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Dev_rim
in reply to: isocam

Hi there.

You have to create a Directory Info object using the path of the folder that contains files you want to delete. And look for all files inside of it "Test*.text"

If you want to look for all sub folders, You can use this:

Dim dinfo As New DirectoryInfo(YOUR_FOLDER_PATH)
For Each myFile In dinfo.GetFiles("Test*.txt", SearchOption.AllDirectories)
    File.Delete(myFile)
Next 

If you want to check only the folder you entered, not the subfolders then you have to change "SearchOption.AllDirectories" to "SearchOption.TopDirectoryOnly".

 

I hope it will help.

 

Regards

Devrim

 

If my answer is solved your problem, please mark it as Solution

Freundliche Grüße / Kind Regards