tonprofde_math 0 Posted May 26, 2005 hi, veiled I want to make a programe which removes the cookies the files in temp and tempory Internet files. but there are folder in tempoy internet files of which i don't know her name how all delete in folder (files and FOLDERS) Share this post Link to post Share on other sites
eJan 0 Posted June 11, 2005 In my case that will be: $Dir = @UserProfileDir & "\Local Settings\Temporary Internet Files" _DirRemoveContents($Dir) MsgBox(262144, "Complete", "Temporary Internet Files cleaned") Func _DirRemoveContents($sPath) Local $sPattern Local $sFile Local $hFile If StringRight($sPath, 1) <> "\" Then $sPath = $sPath & "\" $sPattern = $sPath & "*.*" If Not FileExists($sPath) Then Return 0 FileDelete($sPattern) $hFile = FileFindFirstFile($sPattern) If @error Then Return 0 While 1 $sFile = FileFindNextFile($hFile) If @error Then ExitLoop If $sFile <> "." And $sFile <> ".." Then If StringInStr( FileGetAttrib($sPath & $sFile), "D") Then DirRemove($sPath & $sFile, 1) EndIf EndIf WEnd FileClose($hFile) Return 1 EndFuncWhere all of my Temporary Internet Files and cookies are stored into "Temporary Internet Files" folder without subfolders (WinXP SP2). Share this post Link to post Share on other sites