General discussion

Locked

Outlook Temporary Files

By bradmiller ·
Outlook saves attachments in a hidden, supposedly secure folder and ,according to Microsoft, automatically deletes them when Outlook is closed or the email deleted. From past experience the delete never or rarely happens and these files build up very quickly. The registry contains the location of these files and has the security set. If you search for these files in Windows Explorer they will not be found as they are hidden even if you have the show hidden system files checked. The bad part is they are easily accessible from the command prompt if you know where to look. Many of them have the attribute set to read only. At the command prompt you can copy any of these files easily so many people end up with supposedly secure documents from there email just setting in this hidden folder. Anyone with access to the command prompt can easily access them to do anything they want and this leaves a big security hole.
My solution to this for our organization was a simple little batch file that everyone can run frequently and keep these documents deleted from there system. At this point I have not had to automate this for our people but I am sure there are many ways this could be done or scripted. Using any of the internet options to delete temporary files or using the disk cleanup utility does not remove any of these hidden files. I had everyone create a shortcut to there desktop for easy access and a reminder to run it frequently. The batch file contains the following entries:

cd local settings
cd temporary internet files
cd olk*
dir *.* > c:\outlooktempfilelist.txt
%systemroot%\system32\notepad.exe C:\outlooktempfilelist.txt
ATTRIB -R *.*
dir
del *.*

To keep it simple so that it would not need to be customized for each user this batch file must be placed in the users C:\Documents and Settings\(users name) folder. As long as it is placed in this folder to start with it will work for anyone without modification. By default when you select the command prompt from the menu it starts out in this folder. My suggestion is to create this batch file in this folder and then send a shortcut to the desktop to simplify things.
The first 3 lines navigate to the hidden Outlook Temp folder. Outlook creates it when first started and assigns the folder name olf??? with the last 3 possible characters being generated randomly. There should only be 1 olk folder in this temporary internet files folder so the olk* with the ending wildcard character works well.
I then have the system pipe the dir output to a folder in the root directory of your C: drive so that it can be found on any system. Then I use Notepad to open this text file so the user can easily view the files and make sure they are in the olk folder. Once this is viewed and the user closes Notepad I have the system change the Attributes on all files in this folder and turn off the read only attribute.
I then have the system run another directory listing to the screen just as another verification for the user. If all looks correct they can answer the Delete All question with y and enter or if things do not look correct they can answer n and exit out.

This works well and I am interested to see what solutions others come up with.

Brad Miller

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Hardware Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums