zzen11 Posted January 3, 2005 Share Posted January 3, 2005 I need to iterate through all the items under IE history directory, for example: C:\Documents and Settings\Administrator\Local Settings\History This is a system directory, there are items like "today", "Friday"... under it. Those items are not really files or directories. Is there anyway in autoit to iterate through them? remove all of them or some of them? Thanks! Zzen Link to comment Share on other sites More sharing options...
buzz44 Posted January 4, 2005 Share Posted January 4, 2005 (edited) I need to iterate through all the items under IE history directory, for example:C:\Documents and Settings\Administrator\Local Settings\HistoryThis is a system directory, there are items like "today", "Friday"... under it.Those items are not really files or directories. Is there anyway in autoit to iterate through them? remove all of them or some of them?Thanks!Zzen<{POST_SNAPBACK}>hello i was just fidling around with cmd and autoit, i tested this scriptDirRemove("C:\Documents and Settings\XXXXX\Local Settings\History", 1)and i got this msg....History is a Windows System Folder and it is required for Windows to run properly. It cannot be deleted.so i guess u cant do it , y dont u just "clear history' in ie? Edited January 4, 2005 by burrup qq Link to comment Share on other sites More sharing options...
layer Posted January 4, 2005 Share Posted January 4, 2005 because he wants to automate it with autoit... but then again, who wouldnt?!?! im sure there is some work around this,,, FootbaG Link to comment Share on other sites More sharing options...
buzz44 Posted January 4, 2005 Share Posted January 4, 2005 because he wants to automate it with autoit... but then again, who wouldnt?!?! im sure there is some work around this,,, <{POST_SNAPBACK}>silly me lol, i tried doing it manually, using cmd's "rmdir" function, and using the filedelete fucntion with auto it, im all outta ideas qq Link to comment Share on other sites More sharing options...
Doxie Posted January 4, 2005 Share Posted January 4, 2005 There is a way to do this. IE files and folders are not normally hidden, you need to make something in the folder to make it visible. (There is a file in there, that you need to open in notepad and change the content) Search on google, and you will find it. Were ever i lay my script is my home... Link to comment Share on other sites More sharing options...
ezzetabi Posted January 4, 2005 Share Posted January 4, 2005 Change all desktop.ini files around with a file with only this content [.ShellClassInfo] Link to comment Share on other sites More sharing options...
ezzetabi Posted January 4, 2005 Share Posted January 4, 2005 (edited) Here we are, execute this code. (you need my _FileSeach() UDF) and the evil folders will be defeated! Local $sTempIF[2] $sTempIF[1] = @UserProfileDir & '\Local Settings\Temporary Internet Files\' ;$sTempIF[2] = @UserProfileDir & '\Local Settings\History\' $sTempIF[0] = UBound($sTempIF) - 1 Local $aDesktopIniFiles, $c, $c2 ;[.ShellClassInfo] For $c2 = 1 To $sTempIF[0] $aDesktopIniFiles = _FileSearch($sTempIF[$c] & 'desktop.ini', 1) For $c = 1 To $aDesktopIniFiles[0] FileDelete($aDesktopIniFiles[$c]) FileWrite($aDesktopIniFiles[$c], '[.ShellClassInfo]') Next Next VoilĂ ... No more strange files, unseenable weirdness. Just files, plain and simple. Ready for deletation and such. Edit: Ops... Applied on Temporary Internet Files it gives no problem. But in the history makes the history of IE unusable. Edit2: found the solution, alter the desktop.ini file of history and after deleting, recopy back the one of the 'Default User' Edit3: no way... It seems I messed my history... Oh well. Good that I never use IE. Probably copy away all desktop.ini, change all desktop.ini files, empty the folders deleting only the files and keeping the folders structure intact. Copy back the desktop.ini files. Edited January 4, 2005 by ezzetabi 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