Jump to content
Sign in to follow this  

Problem changing the working directory

Recommended Posts

HI !

I have a problem when I tryed to change the working directory to my "Temporary Internet Files" folder to delete files inside.

FileChangeDir("C:\Documents and Settings\Me\Local Settings\Temporary Internet Files")
MsgBox(4096, "Working dir", @WorkingDir)
$search = FileFindFirstFile("*.*")
If $search = -1 Then
While 1
          $file = FileFindNextFile($search) 
          If @error Then ExitLoop
          MsgBox(4096, "File:", $file)

Fortunatly, I put FileDelete on comment before running the script.

The first message box display "C:\Documents and Settings\Me\Local Settings\Temporary Internet Files" but the search loop message box display files from an other directory.

I tried with some other directories, it works, only my "Temporary Internet Files" folder did not work.

Thanks for helping if you can

Share this post

Link to post
Share on other sites


I guess it depends on the files you want to delete. After deleting they are stored in a folder Content.IE5.

Thats weird M$.

It is not that easy to delete the files ... :)

So long,


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post

Link to post
Share on other sites

Works for me:

MsgBox(4096, "Original Working Dir", @WorkingDir)
FileChangeDir("C:\Documents and Settings\" & @UserName & "\Local Settings\Temporary Internet Files")
MsgBox(4096, "New Working dir", @WorkingDir)

;Probably better to use @UserProfileDir & "\Local Settings\Temporary Internet Files"

However, "Temporary Internet Files" is not a normal folder. When viewed with explorer, you see a bunch of files. When viewed from a command prompt you will see one or more subdirectories with random names. So it seems you would need to recurse into the subfolders to delete the files.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post

Link to post
Share on other sites

have you tried the 'delete files' in the internet options ? ie. make a send("!t!o{right}{enter}") when you have internet explorer active.


Run("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", "")
Edited by jinxter

> there are 10 types of people in the world, those who understand binary and those who don't.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...