Tag: recent documents
Keeping Specific File Types Out of My Recent Documents
by Jitesh Gandhi on Feb.28, 2010, under Software, Technology
In Windows, the My Recent Documents Start Menu item is useful and productive. It allows you to quickly open back up an item you were recently working with. Unfortunately, for some users (like me), it can get filled up with files you don’t want in there. In my case, it’s mostly media files (audio, video, pictures). If your application doesn’t stop the files from showing up there, then it can reduce the effectiveness of recent documents.
I tried to find a way to stop these files from being listed. I found some applications you can run to clean up what is shown and some ideas for simple scripts. But again, you have to manually run them after the fact. Finally after some digging, I found a way to prevent them from being listed in the first place.
I’m going to preface my instructions with Microsoft’s registry warning:
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
I’m going to include an example using the image file format JPG (*.jpg files)
- Open the windows registry (Start->Run…, regedit, OK).
- Navigate to HKEY_CLASSES_ROOT.
- Locate the extension for the file type you don’t want to show up in My Recent Documents (.jpg).
- There will be a (Default) key that points to the application that handles these files (on my machine, it is jpegfile).
- Navigate to the value for (Default) within HKEY_CLASSES_ROOT (further down).
- Locate the EditFlags key. If it does not exist you can create one (Edit, New, DWORD Value).
- If the EditFlags Type is REG_DWORD, follow this step and ignore the next step. Change the 3rd value (from the left) from a 0 to a 1. Make sure that the Base is Hexadecimal. In the example above, change the value from 00010000 to 00110000. If it is already a 1, do nothing.
- If the EditFlags Type is REG_BINARY, follow this step. Change the 5th value (from the left) from a 0 to a 1. Make sure that no extra values are added (there should only be 8 characters). An example would be to change the value from 00 00 01 00 to 00 00 11 00. If it is already a 1, do nothing.
- Press OK and exit the registry. (You can repeat this procedure for all the file extensions you wish to keep out of My Recent Documents (e.g. mp3, mpg, avi, wmv, flv, mkv, wav, jpg, gif, bmp, zip, etc.)
This works for Windows XP, Windows Vista and Windows 7. I’m not sure about Windows 2000 and older. Also, for Windows 7, this will also prevent the file from showing up in the Recent or Frequent category of that application’s Jump List.
For the technically minded who want further details on what they are doing, here they are. You are setting a File Attribute Flag, specifically the FTA_NoRecentDocs flag. Because this is the only flag set on that byte, you can simply toggle from 0 to 1. If other flags used this byte, it would become necessary to “OR” all the bits. This is also why you leave all the other values as they were. Finally, the difference between DWORD and BINARY is the position of the least significant byte. In DWORD, the least significant byte comes first. In BINARY, the least significant byte is last.
UPDATE: I have recently discovered that if you upgrade the application or install a new application to handle those files that the registry values could be reset/erased. For example, upgrading Quick Time caused mov and mp4 files to start showing up in My Recent Documents again. So I had to re-do the procedure above. Good thing I wrote it up for future reference. :)