How users can clear the OLKEA folder

D

David Lewis

The OLKEA is the folder used by outlook when you launch email attachments.
It is not cleaned by the delete temporary Internet files button in IE
So how can a regular joe user clear this folder?
Its not browseable with windows explorer
 
G

Guest

David Lewis said:
The OLKEA is the folder used by outlook when you launch email
attachments.
It is not cleaned by the delete temporary Internet files button in IE
So how can a regular joe user clear this folder?
Its not browseable with windows explorer

See http://support.microsoft.com/?id=817878.

When you [pre]view an e-mail that has inline attachments, like embedded
images (not linked ones), a copy of the inline attachment is created in
the OLKnnnn folder. When you select a different e-mail or exit Outlook,
those files are deleted.

When you open an attached file (i.e., not inline) but don't save it, the
OLKnnnn path is used to save a temporary copy of that file. When you
close the application used to display that attached file, it is unlikely
that that the application will delete the temporary copy of it. That
temp file won't get deleted until you exit Outlook.

Since the name of this temp path changes (OLKnnnn, where nnnn is some
random string), perhaps you are looking in an old path that didn't get
purged because Outlook crashed instead of exiting properly. That means
any subsequent use of that same path won't have Outlook remembering that
it opened it to then close it because that instance of Outlook didn't
open it. It may also be a different OLKnnnn path that the current
instance of Outlook is using. For example, mine is currently called
OLK1965.

Also note the behavior mentioned at
http://www.outlook-tips.net/archives/20030828.htm regarding changing to
view a different mail item while you still have an attachment open from
the prior mail item. This is because, as noted above, the application
you use to view the attached file is not Outlook and so it doesn't
perform the temp file synchronization of Outlook (but Outlook may delete
the file when it is exited which results in the application erroring
should you attempt to edit it but the application may lock the file
which means Outlook cannot delete it on its exit). For me and for the
few tests that I made, I cannot get .jpg files to remain in the OLK*
folder when Outlook exits. The viewer still shows the .jpg file but its
source file is gone (i.e., the viewer is showing the copy that is in
memory). When I open a .doc attachment in an e-mail and exit Outlook,
the file remains in the OLK* folder because Word still has a file handle
to it (the file is open in write mode and not just read mode). Exiting
Word does not then delete the temp file (i.e., it gets left behind).

You are asking non-integrated applications, Outlook and some viewer app,
to perform coordinated functions but they won't. There are far too many
apps that could be used as viewers for Outlook to bother monitoring
which opened an attachment, and there are far too many e-mail programs
for viewer/edit apps to monitor which e-mail client created the file
that the viewer/edit app opened. Running the Disk Cleanup wizard won't
help since it doesn't purge the OLK* folder. CCleaner lists Office XP
for an application that it cleans out files
(http://www.ccleaner.com/features.asp) but doesn't specifically mention
the OLK* folder. You could ask in their forum if the OLK* folder is
included. I haven't used this utility so I cannot vouch for this
stability, robustness (so that it doesn't cause damage), that it has no
covert payload (like spyware), etc., but I have seen it get good ratings
as known review sites and many users have found it helpful. You could
just put a shortcut to "Documents and Settings\<youraccount>\Local
Settings\Temporary Internet Files\OLKnnnn" (or wherever is you OLK
folder) in your Office startup folder to make it easy to periodically
open that folder and check for crap that got left behind. I suppose you
could also write a .bat file that deletes all files in that folder and
then schedule a run of it in Task Scheduler.
 
B

Brian Tillman

David Lewis said:
The OLKEA is the folder used by outlook when you launch email
attachments. It is not cleaned by the delete temporary Internet files
button in IE
So how can a regular joe user clear this folder?
Its not browseable with windows explorer

Open Command Prompt window and enter the following:

cd %UserProfile%\Local Settings\Temporary Internet FIles
dir /a

You should then see the OLK folder. Remove it with:

rmdir /q /s OLKEA
 
D

David Lewis

yes I can do that but I am supporting architects that can barely remember how to clear the Internet files in IE
windows blocks access to that folder.

"Brian Tillman" <[email protected]>
|>
|>> The OLKEA is the folder used by outlook when you launch email
|>> attachments. It is not cleaned by the delete temporary Internet files
|>> button in IE
|>> So how can a regular joe user clear this folder?
|>> Its not browseable with windows explorer
|>
|>Open Command Prompt window and enter the following:
|>
|>cd %UserProfile%\Local Settings\Temporary Internet FIles
|>dir /a
|>
|>You should then see the OLK folder. Remove it with:
|>
|>rmdir /q /s OLKEA
 
D

David Lewis

I understand that there is not supposed to be files there but the fact remains that
there is files there that the users do not want there.
I need to send out a memo on how to clean that folder

<Vanguard>
|>|>> The OLKEA is the folder used by outlook when you launch email
|>> attachments.
|>> It is not cleaned by the delete temporary Internet files button in IE
|>> So how can a regular joe user clear this folder?
|>> Its not browseable with windows explorer
|>>
|>
|>See http://support.microsoft.com/?id=817878.
|>
|>When you [pre]view an e-mail that has inline attachments, like embedded
|>images (not linked ones), a copy of the inline attachment is created in
|>the OLKnnnn folder. When you select a different e-mail or exit Outlook,
|>those files are deleted.
|>
|>When you open an attached file (i.e., not inline) but don't save it, the
|>OLKnnnn path is used to save a temporary copy of that file. When you
|>close the application used to display that attached file, it is unlikely
|>that that the application will delete the temporary copy of it. That
|>temp file won't get deleted until you exit Outlook.
|>
|>Since the name of this temp path changes (OLKnnnn, where nnnn is some
|>random string), perhaps you are looking in an old path that didn't get
|>purged because Outlook crashed instead of exiting properly. That means
|>any subsequent use of that same path won't have Outlook remembering that
|>it opened it to then close it because that instance of Outlook didn't
|>open it. It may also be a different OLKnnnn path that the current
|>instance of Outlook is using. For example, mine is currently called
|>OLK1965.
|>
|>Also note the behavior mentioned at
|>http://www.outlook-tips.net/archives/20030828.htm regarding changing to
|>view a different mail item while you still have an attachment open from
|>the prior mail item. This is because, as noted above, the application
|>you use to view the attached file is not Outlook and so it doesn't
|>perform the temp file synchronization of Outlook (but Outlook may delete
|>the file when it is exited which results in the application erroring
|>should you attempt to edit it but the application may lock the file
|>which means Outlook cannot delete it on its exit). For me and for the
|>few tests that I made, I cannot get .jpg files to remain in the OLK*
|>folder when Outlook exits. The viewer still shows the .jpg file but its
|>source file is gone (i.e., the viewer is showing the copy that is in
|>memory). When I open a .doc attachment in an e-mail and exit Outlook,
|>the file remains in the OLK* folder because Word still has a file handle
|>to it (the file is open in write mode and not just read mode). Exiting
|>Word does not then delete the temp file (i.e., it gets left behind).
|>
|>You are asking non-integrated applications, Outlook and some viewer app,
|>to perform coordinated functions but they won't. There are far too many
|>apps that could be used as viewers for Outlook to bother monitoring
|>which opened an attachment, and there are far too many e-mail programs
|>for viewer/edit apps to monitor which e-mail client created the file
|>that the viewer/edit app opened. Running the Disk Cleanup wizard won't
|>help since it doesn't purge the OLK* folder. CCleaner lists Office XP
|>for an application that it cleans out files
|>(http://www.ccleaner.com/features.asp) but doesn't specifically mention
|>the OLK* folder. You could ask in their forum if the OLK* folder is
|>included. I haven't used this utility so I cannot vouch for this
|>stability, robustness (so that it doesn't cause damage), that it has no
|>covert payload (like spyware), etc., but I have seen it get good ratings
|>as known review sites and many users have found it helpful. You could
|>just put a shortcut to "Documents and Settings\<youraccount>\Local
|>Settings\Temporary Internet Files\OLKnnnn" (or wherever is you OLK
|>folder) in your Office startup folder to make it easy to periodically
|>open that folder and check for crap that got left behind. I suppose you
|>could also write a .bat file that deletes all files in that folder and
|>then schedule a run of it in Task Scheduler.
 
D

Diane Poremsky [MVP]

the reason ms switched to the securetemp folder under the TIF folder was to
prevent other users from seeing the contents - only the logged in user has
access to the folder.

The easiest way to prevent files from being cached in that folder is to not
open files from email - save them to my docs then open the saved copy. You
can also move the location of the securetemp folder to make it easier for
users to delete files in it. See
http://www.outlook-tips.net/archives/20030828.htm for the steps needed to
relocate the folder.

You can create a batch folder for users to run that will empty it. You
should also be able to use a log on (or log off) script to delete the
contents.

--
Diane Poremsky [MVP - Outlook]
Author, Teach Yourself Outlook 2003 in 24 Hours
Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)
Author, Google and Other Search Engines (Visual QuickStart Guide)



Join OneNote Tips mailing list: http://www.onenote-tips.net/


David Lewis said:
I understand that there is not supposed to be files there but the fact
remains that
there is files there that the users do not want there.
I need to send out a memo on how to clean that folder

<Vanguard>
|>|>> The OLKEA is the folder used by outlook when you launch email
|>> attachments.
|>> It is not cleaned by the delete temporary Internet files button in IE
|>> So how can a regular joe user clear this folder?
|>> Its not browseable with windows explorer
|>>
|>
|>See http://support.microsoft.com/?id=817878.
|>
|>When you [pre]view an e-mail that has inline attachments, like embedded
|>images (not linked ones), a copy of the inline attachment is created in
|>the OLKnnnn folder. When you select a different e-mail or exit Outlook,
|>those files are deleted.
|>
|>When you open an attached file (i.e., not inline) but don't save it, the
|>OLKnnnn path is used to save a temporary copy of that file. When you
|>close the application used to display that attached file, it is unlikely
|>that that the application will delete the temporary copy of it. That
|>temp file won't get deleted until you exit Outlook.
|>
|>Since the name of this temp path changes (OLKnnnn, where nnnn is some
|>random string), perhaps you are looking in an old path that didn't get
|>purged because Outlook crashed instead of exiting properly. That means
|>any subsequent use of that same path won't have Outlook remembering that
|>it opened it to then close it because that instance of Outlook didn't
|>open it. It may also be a different OLKnnnn path that the current
|>instance of Outlook is using. For example, mine is currently called
|>OLK1965.
|>
|>Also note the behavior mentioned at
|>http://www.outlook-tips.net/archives/20030828.htm regarding changing to
|>view a different mail item while you still have an attachment open from
|>the prior mail item. This is because, as noted above, the application
|>you use to view the attached file is not Outlook and so it doesn't
|>perform the temp file synchronization of Outlook (but Outlook may delete
|>the file when it is exited which results in the application erroring
|>should you attempt to edit it but the application may lock the file
|>which means Outlook cannot delete it on its exit). For me and for the
|>few tests that I made, I cannot get .jpg files to remain in the OLK*
|>folder when Outlook exits. The viewer still shows the .jpg file but its
|>source file is gone (i.e., the viewer is showing the copy that is in
|>memory). When I open a .doc attachment in an e-mail and exit Outlook,
|>the file remains in the OLK* folder because Word still has a file handle
|>to it (the file is open in write mode and not just read mode). Exiting
|>Word does not then delete the temp file (i.e., it gets left behind).
|>
|>You are asking non-integrated applications, Outlook and some viewer app,
|>to perform coordinated functions but they won't. There are far too many
|>apps that could be used as viewers for Outlook to bother monitoring
|>which opened an attachment, and there are far too many e-mail programs
|>for viewer/edit apps to monitor which e-mail client created the file
|>that the viewer/edit app opened. Running the Disk Cleanup wizard won't
|>help since it doesn't purge the OLK* folder. CCleaner lists Office XP
|>for an application that it cleans out files
|>(http://www.ccleaner.com/features.asp) but doesn't specifically mention
|>the OLK* folder. You could ask in their forum if the OLK* folder is
|>included. I haven't used this utility so I cannot vouch for this
|>stability, robustness (so that it doesn't cause damage), that it has no
|>covert payload (like spyware), etc., but I have seen it get good ratings
|>as known review sites and many users have found it helpful. You could
|>just put a shortcut to "Documents and Settings\<youraccount>\Local
|>Settings\Temporary Internet Files\OLKnnnn" (or wherever is you OLK
|>folder) in your Office startup folder to make it easy to periodically
|>open that folder and check for crap that got left behind. I suppose you
|>could also write a .bat file that deletes all files in that folder and
|>then schedule a run of it in Task Scheduler.
 
D

David Lewis

well its not very secure
I think I'll just add a delete to the logout script

thankx

"Diane Poremsky [MVP]" <[email protected]>
|>the reason ms switched to the securetemp folder under the TIF folder was to
|>prevent other users from seeing the contents - only the logged in user has
|>access to the folder.
|>
|>The easiest way to prevent files from being cached in that folder is to not
|>open files from email - save them to my docs then open the saved copy. You
|>can also move the location of the securetemp folder to make it easier for
|>users to delete files in it. See
|>http://www.outlook-tips.net/archives/20030828.htm for the steps needed to
|>relocate the folder.
|>
|>You can create a batch folder for users to run that will empty it. You
|>should also be able to use a log on (or log off) script to delete the
|>contents.
 
D

David Lewis

how can I automate this with a logout script if the dir is different on every machine?

"Brian Tillman" <[email protected]>
|>
|>> The OLKEA is the folder used by outlook when you launch email
|>> attachments. It is not cleaned by the delete temporary Internet files
|>> button in IE
|>> So how can a regular joe user clear this folder?
|>> Its not browseable with windows explorer
|>
|>Open Command Prompt window and enter the following:
|>
|>cd %UserProfile%\Local Settings\Temporary Internet FIles
|>dir /a
|>
|>You should then see the OLK folder. Remove it with:
|>
|>rmdir /q /s OLKEA
 
D

Diane Poremsky [MVP]

well its not very secure

Actually, it is quite secure if the system is shared by several people with
their own logons. Only the logged in user can see the files, and only with
some effort.
I think I'll just add a delete to the logout script

That's probably the easiest way to keep it clear.
 
B

Brian Tillman

David Lewis said:
how can I automate this with a logout script if the dir is different
on every machine?

Not only is it different on every machine, it's different for each user on
that machine. If you can read the registry key, though, you can determine
the folder name. I don't know how to read the registry from a script.
 
C

Cassanius

Quelle: http://tinyurl.com/y8qb3j
Accepted Answer from BlueDevilFan
Date: 06/24/2006 11:16AM PDT
Grade: A
Accepted Answer

Here's the macro. Follow these instructions to use it.

1. Launch Outlook.
2. Click Tools->Macro->Visual Basic Editor.
3. In the code editor expand Microsoft Outlook Objects and click on
ThisOutlookSession.
4. Copy the code below and paste it into the right-hand pane of the
editor window.
5. Click the diskette icon on the toolbar to save the changes.
6. Close the editor.
7. Click Tools->Macro->Security
8. Set the security level to Medium.
9. Close Outlook
10. Launch Outlook. You'll receive a prompt asking if you want to
enable macros. You have to enable them for this code to work.
11. Each time Outlook closes it fires the Quit event and the code runs.
It will find Outlook's temporary files folder and delete its contents.


Private Sub Application_Quit()
Dim objFSO As Object, _
objTempFilesFolder As Object, _
objFolder As Object, _
strProfilePath As String
strProfilePath = Environ("USERPROFILE")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTempFilesFolder = objFSO.GetFolder(strProfilePath & "\Local
Settings\Temporary Internet Files")
For Each objFolder In objTempFilesFolder.SubFolders
If Left(objFolder.Name, 3) = "OLK" Then
objFSO.DeleteFile objFolder.Path & "\*.*", True
End If
Next
Set objFolder = Nothing
Set objTempFilesFolder = Nothing
Set objFSO = Nothing
End Sub
 
P

Peter Marchert

Or simply use the script "DeleteOLKs" (http://tinyurl.com/9ce35) and/or
see the actual post in the forum on my homepage ("Forum", "Software",
"Sonstige Programme", "DeleteOLKs (English)").

Best Regards
Peter
 
J

John Reid

Brian said:
Open Command Prompt window and enter the following:
cd %UserProfile%\Local Settings\Temporary Internet FIles
dir /a

You should then see the OLK folder. Remove it with:
rmdir /q /s OLKEA

Brian and others,
you can avoid using the command prompt ("DOS") by
copying the Temp Internet Files folder to another folder
(on your hard drive) which causes the hidden folders to
be viewable from that folder. Then you can simply append
their names (one at a time) to the Temp path in Windows
Explorer in order to see & delete those nasty folders.

For example, here I have appended OLK7:
C:\Documents and Settings\johnreid\Local Settings\
Temporary Internet Files\OLK7
(you have to have the exact name because wild
cards won't work here - you can't use OLK*)

--Good Ol' John--
 
B

Brian Tillman [MVP - Outlook]

you can avoid using the command prompt ("DOS") by
copying the Temp Internet Files folder to another folder
(on your hard drive) which causes the hidden folders to
be viewable from that folder. Then you can simply append
their names (one at a time) to the Temp path in Windows
Explorer in order to see & delete those nasty folders.

You can also simply redirect the Outlook Secure Temp folder with the registry
key HKEY_CURRENT_USER\Software\Microsoft\Office\vv.v\Outlook\Security and
leave Temporary Internet Files where it is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top