PDA

View Full Version : Find and delete files (W2K)



TJStanley
02-16-2006, 07:22 PM
I need to write a script to search a drive for specific files and then delete those files. If the file in question is in use, the script should simply move on to the next file to be deleted. The delete part is simple enough, but how do I do the search?

thalam
02-28-2006, 02:21 PM
have a look at my script located at http://www.winguides.com/forums/showflat.php?Cat=&Board=brdScripting&Number=139811&page=0&view=collapsed&sb=5&part=

simply change it to delete rather than to move. The search is at the top of the page. And then just the FOR NEXT loop is all u need, your deleting code will be inside the FOR NEXT loop.