Jump to content

how to list files in a temp folder?


 Share

Recommended Posts

I want to delete cookies & made a script but returns following. but if I go & open C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files in a folder then I see load of files & cookies. Any idea how can they be deleted, if autoit cant even find the folder?

[1]|Content.IE5
[2]|Content.MSO
[3]|Content.Word
[4]|desktop.ini

#Include <File.au3>
#Include <Array.au3>

    $cookies = _FileListToArray('C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files')
    _ArrayDisplay($cookies)
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

The cookies folder is hidden by default so you will have to enable "Show Hidden Files and Folders" to get the exact path.

PS. I hope you are NOT REALLY using the administartor account for your normal computing. If you are, and you're in my area, I'll send you a business card.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Show hidden files & folders was already enabled now I enabled to show also superhidden & I still see only 4 folders & 0 cookies.

the location of the cookie is :

C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Cookie:administrator@email.su/

how can I delete it?

PS: yes im using admin acc & win xp sp3 80 MB, installer edition, been using it for last 5,7 years, nev er updated it...with disabled firewall...which is also has a backup ghost image copy & being restored from it like every month or so. I dont think ur business card would be necessary. cuz during the time Iv e had only 1 virus infection since then I learned to run new executables in a sandbox.

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

In XP the default location for Cookies is

C:\Documents and Settings\<username>\Cookies\

and that's the one you want.

You have to enable System files/folders to view it but you should still be able to delete them although you may have to use FileSetAttrib() to do it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

ye this works, thanx

but there are still some cookies under internet temp files. so they are wrong cookies? Ie isnt using them ?

$cookies = @UserProfileDir & '\Cookies\*.txt'

FileDelete($cookies)
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

as I recall those are simply session cookies and don't mean a thing although I have also seen them be shortcuts to the same ones in the cookies folder.

You know, in IE you can eliminate a lot of the problem by setting IE to delete temp internet files when exiting. Unless you are on dialup you don't need to cache web pages.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Some of the files and cookies in the Temp folder are there whilst things are working so its not that easy to clear the whole lot as i recall

Is it really that necessary to remove all?

Link to comment
Share on other sites

You know, in IE you can eliminate a lot of the problem by setting IE to delete temp internet files when exiting. Unless you are on dialup you don't need to cache web pages.

im using IE6 & havent seen an option to delete cokies after IE exits. where is that option.?

PS:I must delete old cookies before I start IE or site will give me error.(its an issue with the server, but im not planning to w8 until they feel like fixing it.)

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

It doesn't delete cookies, just the Temporary Internet Files. Internet Options >> Advanced >> Under "Security" group locate and check "Empty Temporary Internet Files folder when browser is closed".

Also, If you are trying to get rid of all the cookies in the Cookies folder you can do it easier than using an array to loop through the files.

$sCookies_Fldr = @UserProfileDir & "\Cookies\"
FileSetAttrib($sCookies_Fldr, -SHR, 1)
If DirRemove($sCookiesFldr, 1) Then
    DirCreate($sCookies_Fldr)
    FileSetAttrib($sCookies_Fldr, +SH)
Else
    FileSetAttrib($sCookies_Fldr, +SH)
    MsgBox(4096, "Error", "There was a problem deleting the folder " & $sCookies_Fldr)
EndIf

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...