;#include #RequireAdmin #include ;If IsAdmin() Then MsgBox($MB_SYSTEMMODAL, "", "The script is running with admin rights.") ;$DIR = FileSelectFolder("Select","") $DIR = $CmdLine[1] MsgBox (0,"",$DIR) If Not @error Then $FILE = _FileListToArray($DIR) If IsArray($FILE) Then Dim $PATH[5] ProgressOn("Folder Remove",$DIR) For $INDEX = 1 To $FILE[0] ProgressSet($INDEX*100/$FILE[0],$FILE[$INDEX]) _PathSplit($DIR & "\" & $FILE[$INDEX],$PATH[1],$PATH[2],$PATH[3],$PATH[4]) If $PATH[4] <> "" Then FileDelete($DIR & "\" & $FILE[$INDEX]) Else DirRemove($DIR & "\" & $FILE[$INDEX],1) ;DirRemove($DIR) EndIf Sleep(250) Next ProgressOff() EndIf DirRemove($DIR) EndIf