I'm trying todo a wildcard search of the entire C:\ drive to find folders which have a value of "xxxxx" for example and then run "eraser" on them to securely delete them from the machine, using the example of wildcards in the help file I can get my script to return the name of the folder's it's found on the root of c:\ but I have two problems, the first is that it only returns the folders with value of "xxxxx" on the root of C:\ and not for example any in C:\Program Files and the second when the folder names are passed to eraser, eraser return an error saying : "File not found. Nothing to erase. (xxxxx \)" if someone could point me in the right direction i would be most grateful.
Local $eraser = ("Path to eraser") ; Shows the filenames of all files in the current directory. Local $search = FileFindFirstFile( "\*xxxxx*" ) ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 Local $folder = FileFindNextFile($search) If @error Then ExitLoop RunWait ( $eraser & "\Eraserl.exe -folder "" " & $folder & " ""-subfolders -method Random 2" ) WEnd ; Close the search handle FileClose($search)