topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 2:26 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Keep some folders out of my "Recent places"  (Read 15966 times)

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
IDEA: Keep some folders out of my "Recent places"
« on: May 22, 2011, 05:54 AM »
I'm running Windows 7 and like the "Recent places" link in my Windows Explorer.  HOWEVER, it's INCREDIBLY embarrassing when I'm in front of clients/friends because sometimes I have drives and folders list in Recent places that I don't want people to see.  Can you build a system tray utility that will monitor and sanitize my Recent places so that only specific drives or folders are shown there?

I'm running Windows 7 64 bit.

recentplaces.jpg
« Last Edit: May 22, 2011, 05:59 AM by mayurdotca »

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #1 on: May 22, 2011, 05:56 AM »
If the utility could have a whitelist or blacklist function, that would be cool.  Even if I have to use an ini file, that's OK too cause once it's set, it probably won't change.
« Last Edit: May 22, 2011, 05:59 AM by mayurdotca »

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #2 on: May 22, 2011, 05:58 AM »
Recent places is located at C:\Users\<username>~1\AppData\Roaming\Microsoft\Windows\Recent

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #3 on: May 23, 2011, 02:46 AM »
My suggestion would be just turn off indexing. It's a big drain on resources for little gain.  Use Everything Search instead.

Instead of Recent Places have some shortcuts you use most often in the favorites.  Trying to control how Windows sticks stuff in it's mru lists is pretty much a lost cause.  About the only thing that works is turning it off altogether.

Anyway, I did about 15 minutes of searching and didn't find any utility that claims to do what you want.

Alternatively you might use this to temporarily hide favorites altogether:

http://www.door2wind...rer-navigation-pane/

I tried it on my W7 32 bit machine and it seemed to work fine.
Just bring it up and uncheck everything but Computer until the onlookers leave. :)
« Last Edit: May 23, 2011, 02:48 AM by MilesAhead »

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #4 on: May 23, 2011, 07:25 AM »
Add the folders you want to hide to the recent places list.
Go to the folder you specified earlier.
Apply the Deny Read NTFS permission to the shortcut files that you don't want to have displayed.

Now the shell can't display them in the list because you're not allowed to (read) see them.

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #5 on: May 23, 2011, 02:01 PM »
My suggestion would be just turn off indexing. It's a big drain on resources for little gain.  Use Everything Search instead.

Instead of Recent Places have some shortcuts you use most often in the favorites.  Trying to control how Windows sticks stuff in it's mru lists is pretty much a lost cause.  About the only thing that works is turning it off altogether.

Anyway, I did about 15 minutes of searching and didn't find any utility that claims to do what you want.

Alternatively you might use this to temporarily hide favorites altogether:

http://www.door2wind...rer-navigation-pane/

I tried it on my W7 32 bit machine and it seemed to work fine.
Just bring it up and uncheck everything but Computer until the onlookers leave. :)


Would turning off indexing stop the ability to search program files on the start menu?  I do use that feature.  Everything Search doesn't search file contents which is a sometimes useful feature.

I use favorites as well for recent projects I'm working on.  Recent places is a useful function as well, just not for some folders I don't want seen.

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #6 on: May 23, 2011, 02:02 PM »
Add the folders you want to hide to the recent places list.
Go to the folder you specified earlier.
Apply the Deny Read NTFS permission to the shortcut files that you don't want to have displayed.

Now the shell can't display them in the list because you're not allowed to (read) see them.
-Stoic Joker (May 23, 2011, 07:25 AM)

I'm constantly looking at new folders.  Would I have to do this each time a new folder is used via Windows Explorer?  This doesn't seem like a great option but a good idea nonetheless. 

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #7 on: May 23, 2011, 03:05 PM »
Would I have to do this each time a new folder is used via Windows Explorer?

Yes and no. Obviously the "Safe" stuff doesn't need fiddled with. But the folders that you want to hide would all need to be given the above treatment.

Assuming the stuff isn't scattered everywhere... :D ...There shouldn't be that many targets to hide.

Might I also suggest using slightly more discreet folder names... ;)

[Nuns Gone Wild Donkey Porn] - Bad Idea.

[Private Vid Files] - Good Idea.

Ya know.

mayurdotca

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Keep some folders out of my "Recent places"
« Reply #8 on: May 23, 2011, 03:37 PM »
Well after not being satisfied with these options, I ended up looking for a directory monitor that would run a VBS file on a regular basis. I found a great little utility from I ended up using: Directory Monitor from http://www.deventerp...se.net/Projects.aspx.  I have included a copy of my script for future reference. Perhaps someone will one day turn the vbs into a little executable. :)

My script will

1. Locate all shortcuts in your \AppData\Roaming\Microsoft\Windows\Recent folder
2. Delete all shortcuts that contain drive letters F through Z

If you want to customize this yourself to keep shortcuts for some folders, simply delete the areas in this script that contain drive letters you want to retain in your Recent Places or Recent Items. For example, if you want to keep shortcuts to drive H, then delete the following from the script.

CleanPath = "H:\"
If InStr(shortTarget, CleanPath) then
   Set myFileToDelete = objFSO.GetFile(fullname)
   myFileToDelete.Delete
End If


Code: Visual Basic [Select]
  1. Dim objShell, objFSO, CleanPath, fileFolder
  2. Dim userFolder, desktopFolder, custFolder, extension
  3. Dim fullname, shortcut, shortTarget
  4.  
  5. Dim WshS
  6. Set WshS = WScript.CreateObject("WScript.Shell")
  7. Set fso = CreateObject("Scripting.FileSystemObject")
  8.  
  9. 'Expand Environment
  10. 'Create const's to spare time and place
  11. usrProfile = WshS.ExpandEnvironmentStrings("%UserProfile%")
  12. Set objShell = CreateObject("WScript.Shell")
  13. Set objFSO = CreateObject("Scripting.FileSystemObject")
  14. Set searchFolder = objFSO.GetFolder(usrProfile & "\AppData\Roaming\Microsoft\Windows\Recent")
  15. Set custFolder = searchFolder.Files
  16.  
  17. For Each custFile in custFolder
  18.         extension = objFSO.GetExtensionName(LCase(custFile.name))
  19.         If extension = "lnk" then
  20.                 'Find full path of target within shortcut
  21.                 fullname = objFSO.GetAbsolutePathName(custFile)
  22.                 'See http://www.devguru.com/Technologies/wsh/quickref/wshshell_CreateShortcut.html
  23.                 'for more information on how this works.
  24.                 Set shortcut = objShell.CreateShortcut(fullname)
  25.                 shortTarget = shortcut.TargetPath
  26.                 Dim myFileToDelete
  27.  
  28.                 CleanPath = "F:\"
  29.                 If InStr(shortTarget, CleanPath) then
  30.                         Set myFileToDelete = objFSO.GetFile(fullname)
  31.                         myFileToDelete.Delete
  32.                 End If
  33.                 CleanPath = "G:\"
  34.                 If InStr(shortTarget, CleanPath) then
  35.                         Set myFileToDelete = objFSO.GetFile(fullname)
  36.                         myFileToDelete.Delete
  37.                 End If
  38.                 CleanPath = "H:\"
  39.                 If InStr(shortTarget, CleanPath) then
  40.                         Set myFileToDelete = objFSO.GetFile(fullname)
  41.                         myFileToDelete.Delete
  42.                 End If
  43.                 CleanPath = "I:\"
  44.                 If InStr(shortTarget, CleanPath) then
  45.                         Set myFileToDelete = objFSO.GetFile(fullname)
  46.                         myFileToDelete.Delete
  47.                 End If
  48.                 CleanPath = "J:\"
  49.                 If InStr(shortTarget, CleanPath) then
  50.                         Set myFileToDelete = objFSO.GetFile(fullname)
  51.                         myFileToDelete.Delete
  52.                 End If
  53.                 CleanPath = "K:\"
  54.                 If InStr(shortTarget, CleanPath) then
  55.                         Set myFileToDelete = objFSO.GetFile(fullname)
  56.                         myFileToDelete.Delete
  57.                 End If
  58.                 CleanPath = "L:\"
  59.                 If InStr(shortTarget, CleanPath) then
  60.                         Set myFileToDelete = objFSO.GetFile(fullname)
  61.                         myFileToDelete.Delete
  62.                 End If
  63.                 CleanPath = "M:\"
  64.                 If InStr(shortTarget, CleanPath) then
  65.                         Set myFileToDelete = objFSO.GetFile(fullname)
  66.                         myFileToDelete.Delete
  67.                 End If
  68.                 CleanPath = "N:\"
  69.                 If InStr(shortTarget, CleanPath) then
  70.                         Set myFileToDelete = objFSO.GetFile(fullname)
  71.                         myFileToDelete.Delete
  72.                 End If
  73.                 CleanPath = "O:\"
  74.                 If InStr(shortTarget, CleanPath) then
  75.                         Set myFileToDelete = objFSO.GetFile(fullname)
  76.                         myFileToDelete.Delete
  77.                 End If
  78.                 CleanPath = "P:\"
  79.                 If InStr(shortTarget, CleanPath) then
  80.                         Set myFileToDelete = objFSO.GetFile(fullname)
  81.                         myFileToDelete.Delete
  82.                 End If
  83.                 CleanPath = "Q:\"
  84.                 If InStr(shortTarget, CleanPath) then
  85.                         Set myFileToDelete = objFSO.GetFile(fullname)
  86.                         myFileToDelete.Delete
  87.                 End If
  88.                 CleanPath = "R:\"
  89.                 If InStr(shortTarget, CleanPath) then
  90.                         Set myFileToDelete = objFSO.GetFile(fullname)
  91.                         myFileToDelete.Delete
  92.                 End If
  93.                 CleanPath = "S:\"
  94.                 If InStr(shortTarget, CleanPath) then
  95.                         Set myFileToDelete = objFSO.GetFile(fullname)
  96.                         myFileToDelete.Delete
  97.                 End If
  98.                 CleanPath = "T:\"
  99.                 If InStr(shortTarget, CleanPath) then
  100.                         Set myFileToDelete = objFSO.GetFile(fullname)
  101.                         myFileToDelete.Delete
  102.                 End If
  103.                 CleanPath = "U:\"
  104.                 If InStr(shortTarget, CleanPath) then
  105.                         Set myFileToDelete = objFSO.GetFile(fullname)
  106.                         myFileToDelete.Delete
  107.                 End If
  108.                 CleanPath = "V:\"
  109.                 If InStr(shortTarget, CleanPath) then
  110.                         Set myFileToDelete = objFSO.GetFile(fullname)
  111.                         myFileToDelete.Delete
  112.                 End If
  113.                 CleanPath = "W:\"
  114.                 If InStr(shortTarget, CleanPath) then
  115.                         Set myFileToDelete = objFSO.GetFile(fullname)
  116.                         myFileToDelete.Delete
  117.                 End If
  118.                 CleanPath = "X:\"
  119.                 If InStr(shortTarget, CleanPath) then
  120.                         Set myFileToDelete = objFSO.GetFile(fullname)
  121.                         myFileToDelete.Delete
  122.                 End If
  123.                 CleanPath = "Y:\"
  124.                 If InStr(shortTarget, CleanPath) then
  125.                         Set myFileToDelete = objFSO.GetFile(fullname)
  126.                         myFileToDelete.Delete
  127.                 End If
  128.                 CleanPath = "Z:\"
  129.                 If InStr(shortTarget, CleanPath) then
  130.                         Set myFileToDelete = objFSO.GetFile(fullname)
  131.                         myFileToDelete.Delete
  132.                 End If
  133.         End If
  134. Next

How to implement my Recent Places hack described above:

1. Copy the above script into a folder on your computer (anywhere will do) as RecentPlacesSanitizer.vbs
2. Install Directory Monitor
3. Add your Recent Items folder as a folder you want to monitor (c:\users\YOUR USERNAME HERE\AppData\Roaming\Microsoft\Windows\Recent)
3. Specify to run the VB script you have copied above each time this folder changes