tonprofde_math Posted June 30, 2005 Share Posted June 30, 2005 hi I will want creat a program which delete cookies , files and folder in temp and tempoy internet files , history. only i don't know the name of the folders in temp and tempoy internet files.so i creat a sript which lists a folder in temp But I do not know how to make so that it removes the listed folders ( i use windows 98) Code was here ;Requires version 3.1.1 #include <Process.au3> $dir = "dirlist.txt" $i = 0 FileDelete ( $dir ) $fol = _RunDos("dir C:\windows\Temporary Internet Files\ /ad /b>" & $dir) ;If you want to list only filenames type: 'dir /a-d /b' $file = FileOpen($dir, 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open " & $dir) Exit EndIf While 1 $i = $i + 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "Folders", $i & ". Folder in " & @scriptdir & " is: " & $line) Wend FileClose($file) i seems not work?why?how do to work? Link to comment Share on other sites More sharing options...
JSThePatriot Posted June 30, 2005 Share Posted June 30, 2005 Maybe if you would tell us which part didnt work we would be more apt to help, but when you dont mention where it is breaking or anything. No one wants to just read your script and then try to debug it themselves. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
tonprofde_math Posted June 30, 2005 Author Share Posted June 30, 2005 sorry ,i am sorry.it's the wrong code .when i run the scrip ,it would be said that it do not do anything, I wait and at the end of one moment the icon of autoit "A" alternate with a cross I do not understand why script doesn't work. the true code was here $fSearch = FileFindFirstFile("C:\WINDOWS\Temporary Internet Files") If @error <> 0 Then MsgBox(0, "Error in FileFindFirstFile", @error) Exit EndIf While @error = 0 $fName = FileFindNextFile($fSearch) If StringInStr(FileGetAttrib($fName), "D") Then DirRemove($fName, 1) Else FileDelete($fName) EndIf WEnd Link to comment Share on other sites More sharing options...
Valuater Posted June 30, 2005 Share Posted June 30, 2005 Windows 98... huh?Well here is a script that has alot of features....folders and cleaning... etchttp://www.autoitscript.com/forum/index.php?showtopic=11334#hope it helps8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now