I need to write a script for deleting multiple files. I have been able to write one that searches a directory for one file name and then deletes it but I need the ability to specify more than one file name at a time and delete all of them if found. It should be noted that I am not trying to search for duplicate file names. Right now I have to edit the script each time I want to search for a file to delete it, I have to do this several times per day with a dozen or so files at a time.....the file names are never the same; once used they will never be used again.
Here is an example of what I'd like to achieve.
Search C:/junk/log/ for "ff12345a.txt" and "hg76930b.dr1" and "890379.rt" then delete all.
For now I am attempting to do this through a bat file but eventually it would be cool to have a vb program that has a GUI allowing me to specify multiple files I want to search for rather than editing the script each time.
Thanks in advance!
To filter search change di.GetFiles() to di.GetFiles(“.extionsion”)