Sign in to follow this  
Followers 0
zzen11

How to iterate all the items under IE history dir

7 posts in this topic

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

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

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

<{POST_SNAPBACK}>

hello i was just fidling around with cmd and autoit, i tested this script

DirRemove("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 :idiot:, y dont u just "clear history' in ie?

Edited by burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

because he wants to automate it with autoit... but then again, who wouldnt?!?! im sure there is some work around this,,, :idiot:


FootbaG

Share this post


Link to post
Share on other sites

because he wants to automate it with autoit... but then again, who wouldnt?!?! im sure there is some work around this,,, :D

<{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 :idiot:

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

Change all desktop.ini files around with a file with only this content

[.ShellClassInfo]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Here we are, execute this code. (you need my _FileSeach() UDF) and the evil folders will be defeated! :idiot::D

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 by ezzetabi

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0