topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Monday October 7, 2024, 9:46 pm
  • 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

Last post Author Topic: IDEA: reopen recently opened explorer windows, history, MRU  (Read 30431 times)

rgdot

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 2,193
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #25 on: March 17, 2009, 02:04 PM »
Powerpro's *Menu Explorer Last Accessed or Utility Launch Menu --->Recent docs too

apogee22

  • Participant
  • Joined in 2007
  • *
  • Posts: 15
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #26 on: March 26, 2009, 04:58 PM »
FileBox Extender provides a recently used Folder list. That Useful free program was suggested to me here when I wanted something to open all explorer type dialogs in detail mode. I would say FileBox Extender is a must have.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #27 on: May 02, 2010, 06:20 AM »
Today I learned something related to this idea while trying out some NirSoft tools.

One of the tools is called "ShellBagsView" and within a corresponding .chm file there is this text:

Each time that you open a folder in Explorer, Windows automatically save the settings of this folder into the Registry. This utility displays the list of all folder settings saved by Windows. For each folder, the following information is displayed: The date/time that you opened it, the entry number, display mode (Details, Icons, Tiles, and so on...), the last position of the window, and the last size of the window.

Perhaps leveraging this information would allow an approach that doesn't try to periodically monitor what Windows Explorer is doing.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #28 on: May 02, 2010, 11:52 AM »
Since my posts on this thread I've authored 2 Hotkey type apps for this purpose.

1 just monitors folders(FolderCache), the other folders and programs(ReOpen.)

Yes they monitor the active window, but the monitoring is very cheap.
Usually task manager shows them below 1% CPU usage.

In fact I've just made improvements to both that haven't showed up on
Softpedia yet since it's the weekend.  You can download the latest of
both from my hotkeys page:

http://www.favessoft.com/hotkeys.html

I just added F1 help to both while the Popup Window is showing.  By default F1 displays
the Readme file, but if you have TreePad Lite 3 or higher installed, it shows a
TreePad help file.  The TreePad file is much easier to navigate and better organized.

Here's a screen shot of the TreePad Help for ReOpen:

Tree.jpg


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #29 on: May 04, 2010, 06:02 PM »
He he, MilesAhead, I confess I have been a FolderCache user for a bit :Thmbsup:

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #30 on: May 04, 2010, 06:29 PM »
He he, MilesAhead, I confess I have been a FolderCache user for a bit :Thmbsup:


Oh, so you're the other guy!!  I knew of one person using it.  Nice to know a few people find it useful.




MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #31 on: May 04, 2010, 06:37 PM »
btw you may want to try ReOpen instead.  I find sometimes I type a substring in the input filter and I don't get a result in the folder list, but sometimes a recent program that lives in that folder is still in the program list.  Then I can highlight it, press Alt Left Click to paste it into the input line.  Once there I can backspace out the program part to get the folder.

I also cheat by using Everything Search.  If I type in a folder name and come up dry, then I hit ^c to kick off the hotkey search, which I have set to open Everything Search... then the contents of the input filter edit line are sent as a macro.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #32 on: May 05, 2010, 08:27 AM »
btw you may want to try ReOpen instead.  I find sometimes I type a substring in the input filter and I don't get a result in the folder list, but sometimes a recent program that lives in that folder is still in the program list.  Then I can highlight it, press Alt Left Click to paste it into the input line.  Once there I can backspace out the program part to get the folder.

Thanks for the suggestion.  For the particular case of folders that contain applications, I have an existing method of coping :)

I also cheat by using Everything Search.  If I type in a folder name and come up dry, then I hit ^c to kick off the hotkey search, which I have set to open Everything Search... then the contents of the input filter edit line are sent as a macro.

Interesting tip -- I have Everything Search installed but I haven't used it much outside of testing and troubleshooting for the FARR TinyEv plugin.  May be I should investigate it some more.

Returning for a moment to FolderCache I was looking at FolderCache.txt and thinking how similar it is to the output you can get from ShellBagsView from NirSoft.

After choosing to show only the Path and Last Modified Time columns in ShellBagsView (this is a one-time thing), using the following command line invocation, you can get a list of path-date pairs (separated by tabs) sorted with most recent first:

shellbagsview.exe /sort "~Last Modified Time" /stab result.txt

By sending this through some appropriate light processing (drop the tab and the second column), perhaps one can end up with something that FolderCache can use. 

May be for the case where for whatever reason FolderCache doesn't happen to be running this could be useful.  One would feed FolderCache ShellBagsView-originating-but-appropriately-transformed-output (possibly doing some kind of analysis of / merging with FolderCache.txt) and then perhaps it'd be as if FolderCache had been running all along.

What do you think?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #33 on: May 05, 2010, 01:27 PM »
Do you know if it works on 64 bit versions of Windows?  It doesn't mention 64 bit on the product page.

Assuming it does you could come up with a kludge to add the output to FolderCache.txt.
Only thing is the entries from the file are pushing into the stack of folders from the last line in the file to the first, since it's assumed the first line in the file is the most recent folder.

Instead of just appending your info to the end of FolderCache.txt you would want to format your output to look like the entries in FolderCache.txt, then append FolderCache.txt onto your file, then replace FolderCache.txt with your file.  Also you need to make sure FolderCache is not running while you do this since it rewrites the FolderCache.txt on closing.

A few lines of batch should do it depending on what you have to do to format the output of the ShellBagsView.  By having your lines first in the FolderCache.txt file they won't be discarded because the stack has reached its limit.  They will be the last entries pushed on.

edit: looking at the output I don't see what the information is.  It shows the root of the folder opened for all I can see.  A bunch of C:  X: F: with no particular folder info.. unless something escapes me.


edit2: Sifting through registry mish mash, esp. 32 vs 64 bit is not my thing.  That's why I do the active window in the first place.  If you can some up with something yourself I'd be curious to see it though. :)

« Last Edit: May 05, 2010, 01:39 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #34 on: May 05, 2010, 02:58 PM »
btw when I first started doing an app to monitor explorer windows opening I tried several approaches.  I messed around with monitoring or hooking as they say, ShellExecute to detect every time an explorer window was opened.  It's not as straight-forward as it seems from the docs.  Also it's an invasive approach. If your code gets called every time something is executed on the system and you have a bug, you can mess up the smooth operation of the machine.

OTOH, periodically checking what the active window is, is a more passive approach. If you do it  too often, you take a performance hit, but that's about it. It's not the type of thing that risks crashing the shell. I messed around with the frequency of the active window checking on both my machines and got an idea where to tune it to minimize the CPU usage while still detecting most of what I needed to catch.  It's just a little utility after all, not something hooked into the file system like Everything Search is.


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #35 on: May 05, 2010, 04:01 PM »
Do you know if it works on 64 bit versions of Windows?  It doesn't mention 64 bit on the product page.
I didn't manage to determine this via some searching.

As far as making info available to FolderCache is concerned, some kind of merging is what I currently have in mind.  No point in duplicating paths.  Perhaps there is some date / time info (may be the last accessed or modification info for FolderCache.txt?) that can be leveraged for this purpose.

Also you need to make sure FolderCache is not running while you do this since it rewrites the FolderCache.txt on closing.
The situations under which it occurred to me to use this is when FolderCache has not been running, so ordinarily it doesn't seem like it'd be a problem, but thanks for the warning.  It'd be good to check for a running FolderCache.  For reference, the cases I have considered so far are:

  • When you first install FolderCache
  • While performing maintenance / debugging of some sort, it's not unusual for me to shut down a lot of utilities -- sometimes I stop certain things and not others and don't always remember to restart everything (though I wrote a little utility that's been helping me to "fill in the missing processes").
  • Accidental process killing without noticing

I am happy to report that I have not yet witnessed FolderCache crashing on its own :)

A few lines of batch should do it depending on what you have to do to format the output of the ShellBagsView. 
He he.  I will probably avoid batch as I still find it hard to use -- though it's nice that I don't typically need to install anything extra.  (I find coming back to batch good from time to time -- it helps in my appreciation of other programming languages.)

By having your lines first in the FolderCache.txt file they won't be discarded because the stack has reached its limit.  They will be the last entries pushed on.
Thanks for this explanation.

edit: looking at the output I don't see what the information is.  It shows the root of the folder opened for all I can see.  A bunch of C:  X: F: with no particular folder info.. unless something escapes me.
Interesting -- I typically get full path info, though not always.  My current leaning is just to work with full path information, at least to start with.  Hmm, a random thought -- if FolderCache could be handed folder info from other programs (e.g. via command line invocation) whether it's running or not, may be that'd open up some interesting possibilities...

edit2: Sifting through registry mish mash, esp. 32 vs 64 bit is not my thing.  That's why I do the active window in the first place.  If you can some up with something yourself I'd be curious to see it though. :)
If ShellBagsView isn't managing to extract anything useful, my first inclination would be after doing some further testing and searching to see if others had similar experiences, to try to bug Nir Sofer about it -- I think sifting through registry stuff is one of his things :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #36 on: May 05, 2010, 09:16 PM »
So far I really don't see the benefit.  You're going to come up with some complicated software to go through the registry to avoid running a small utility that only uses a couple of megs of ram.  I don't see the cost benefit.

But many things are done combining multiple programs. In fact I've given up trying to do much with the mouse in AutoIt3 when I can just knock off a small ahk app to do the mouse part and let it send the keyboard hotkey to the AutoIt3 app.  Many Linux things are done chaining a bunch of little filter apps.  Give it a go and see what you come up with.

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #37 on: May 06, 2010, 01:31 AM »
Nice work with the helpfile, but what if one has the Treepad portable version? Could you add an option to indicate where the Treepad.exe is located?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #38 on: May 06, 2010, 12:57 PM »
Could you try right clicking on the .hjt help file and using Open With... to select your TreePad exe? I didn't try TreePad portable but I tried the "no install" TreePad viewer and it seemed like once I opened an .hjt file with it, it had the association set. (Or if there's a reason not to set the association please elaborate.  I haven't being doing a lot with apps on USB so I'm not up on all the nuances.)

They let you distribute TreePad Viewer but my help has no graphics and it seems like TreePad Lite snaps open about 4 times faster.

Right now what I'm using is one API call that checks that the help file is there, and that there's an .exe associated with it, in one shot(that's the way it works.. you can't even use a wildcard like *.hjt) so it's pretty much one line of code. But I'm open to it if I see how it would be an enhancement.

edit: I can see you might just use both the program and TreePad from USB.  I'll add an .ini file option, HelpReader or something like that, so you can specify the program to use to open the help file.  .txt file extension is nearly 100% guaranteed to be set up on any machine but .hjt not so.  Sounds like a good modification.  I'll update the version number when it's debugged and available for download.
« Last Edit: May 06, 2010, 01:19 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: reopen recently opened explorer windows, history, MRU
« Reply #39 on: May 06, 2010, 06:31 PM »
Ok, I added the feature.  See the FolderCache 4.3 and ReOpen 4.3 threads for details.
The new versions are on my site now.