A command to get the list of recently opened files to open them [Solved]
A command to get the list of recently opened files to open them [Solved]
I search for a command to get the list of recently opened files so that I can open any of them. That is, something similar to #539, but for files, not directories. Does it exist?
( I know there is the command #632, but it works differently. )
( I know there is the command #632, but it works differently. )
Last edited by John_C on 14 Mar 2022 00:05, edited 1 time in total.
Re: A command to get the list of recently opened files to open them
No, there isn't.
Save your config as a temp one,
Save your config as a temp one,
getsectionlist of "mruOpenedItems" and you have it...One of my scripts helped you out? Please donate via Paypal
Re: A command to get the list of recently opened files to open them
Thanks. Still not possible to open them, though...
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: A command to get the list of recently opened files to open them
You may want to check on these scripts here viewtopic.php?p=183087#p183087. It will give you the option of opening, go to, or go to and run recent files.
Re: A command to get the list of recently opened files to open them
Thanks a lot, I will try it today.
Re: A command to get the list of recently opened files to open them
jupe, this is really brilliant.
I have tried to replace
The first issue is that it doesn't work if I run it being in a "special" tab such as Computer or Recycle Bin.
The second issue is worse. It seems that
What's wrong with it?
I have tried to replace
list_recentlyopenedfiles with list_recentlocations to have the same tab for directories, but it works weird.The first issue is that it doesn't work if I run it being in a "special" tab such as Computer or Recycle Bin.
The second issue is worse. It seems that
<get list_recentlocations>?/silent=1 lists literally everything. ALL directories and ALL files. It have found 100,000 files before I stopped it, including files that I have never opened like 4bvdhvdh36t73e.xml somewhere deep in Program Files.What's wrong with it?
Re: A command to get the list of recently opened files to open them
There is nothing wrong with it, you are the problem. I never suggested to use recentlocations, you are doing a recursive search of all the contents of those locations doing that, you'd need to achieve this differently, eg.
Correct it won't work on a special tab, create a new tab to run it, or script its invocation.
<get list_recentlocations>?/silent=1 /lnCorrect it won't work on a special tab, create a new tab to run it, or script its invocation.
Re: A command to get the list of recently opened files to open them
This is even better than I expected in the first post. (This lists both recent files and recent folders, while I've expected only folders.) Thanks a lot, jupe!
Re: A command to get the list of recently opened files to open them [Solved]
I see you use two switches,
Actually,
I want try to understand what is going on.
l and n. Where I can read about them and about other switches that can be used with this command?Actually,
<get list_recentlocations>?/silent=1 /ln worked somewhat strange for me. It have listed both files and directories (a bug? anyway, I liked it), but each file and each directory were listed twice (what the heck?). After I cleared the list of recent locations, it doesn't list items duplicated (OK, fine), but now it also doesn't list files (pity).I want try to understand what is going on.
Re: A command to get the list of recently opened files to open them [Solved]
quicksearch switches are in the main help under Quicksearch, to make it robust/reliable you would probz need to script it rather than the 1-liner AB example, I was originally just using the addressbar input as a quick way of demonstrating what is possible, it is up to you to adapt the cmds as required, such as a script which combines the 2 recent lists removes duplicates etc. before display in a tab.
But if you still want both combined by just using 1-liner AB input (which may contain virtual/special/real path duplicates, as you mentioned), then eg.
BTW going back to orig question, you can also open recent files from File | Open dialog.
But if you still want both combined by just using 1-liner AB input (which may contain virtual/special/real path duplicates, as you mentioned), then eg.
<get list_recentlocations><crlf><get list_recentlyopenedfiles>?/silent=1 /lnBTW going back to orig question, you can also open recent files from File | Open dialog.
-
admin
- Site Admin
- Posts: 64916
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: A command to get the list of recently opened files to open them
The next beta will keep a soft term like
<get list_recentlyopenedfiles>?/silent=1 //Recently Opened Files unchanged across tab switches and sessions. Currently it is handed down in its resolved form which can be thousands of characters long.FAQ | XY News RSS | XY X
Re: A command to get the list of recently opened files to open them [Solved]
Thanks, Dan!
Jupe, could you explain why these things work so strange?
I have created a catalog entry "Recents", which loads recents.xys. The current contents of recents.xys is following:
This works, now the search of recent locations and recently opened files can be started from any tab.
But if I change the second line from
Jupe, could you explain why these things work so strange?
I have created a catalog entry "Recents", which loads recents.xys. The current contents of recents.xys is following:
Code: Select all
"Recents"
%SystemDrive%
<get list_recentlocations>
<get list_recentlyopenedfiles>?/silent=1 /ln
But if I change the second line from
%SystemDrive% to tab("new", "C:\");, the whole script stops working. On the other hand, tab("new", "C:\"); on its own works fine.Re: A command to get the list of recently opened files to open them [Solved]
What you posted isn't a script, it is just shorthand for quickly going to locations (and it still isn't that correctly, because you mixed in get vars without parsing or a script cmd to launch them), to get it to be parsed as a script the whole things needs to be scripting commands on every-line, not just paths mixed with scripting commands & vars.
-
klownboy
- Posts: 4397
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440
Re: A command to get the list of recently opened files to open them [Solved]
Hi John_C, there are so many ways of doing something similar, but here's one. I added the second main menu item only so there was more than one main menu item. Try the last submenu under "Recents". It will open the recent JPGs and GiFs in a new instance... just for jollies. This must be saved as a script file (e.g., recents.xys). EDIT: Removed the line that used AHK to disable the title bar inadvertently left in.
Code: Select all
"Recents|:favs"
"System Drive|:drives||1" goto "%SystemDrive%";
"Recent Locations|:find||1" goto "<get list_recentlocations>? /ln /silent=1";
"HotList|:find||1" #530;
"Recent Locations Inputselect|:find||1" open inputselect("Recent Locations", get("list_recentlocations"), <crlf>, 1+4+8192 );
"Recent Files|:favfiles||1" goto "<get list_recentlyopenedfiles>?/silent=1";
"Recent - JPGs && GIFs|:favfiles||1"
$self = self("file");
run """<xy>"" /new /win=normal,650,250,350,900 /script=""::load '$self','_Auto'""", , 0,0;
"_Auto";
setlayout("ShowNav=0,ShowTabs=0,ShowCatalog=0,ShowStatusbar=0,ShowCrumb=0,ShowAddressbar=0,ShowToolbar=0,ShowMainMenu=0");
dark 1;
goto "<get list_recentlyopenedfiles>?/silent=1 /types=gif;jpg";
"Tools && Utilities|:conf"
"Device Manager|:openwith||1" run "explorer shell:::{74246bfc-4c96-11d0-abef-0020af6b0b7a}";
"IP Configuration|:mru||1" text runret ("cmd /c ipconfig /all"), 720, 900, "IP Config",,;
"Disk Management|:cfi||1" open "C:\Windows\System32\diskmgmt.msc";
Last edited by klownboy on 16 Mar 2022 15:52, edited 1 time in total.
XYplorer Beta Club