A command to get the list of recently opened files to open them [Solved]
Re: A command to get the list of recently opened files to open them [Solved]
@klownboy Thanks, this is useful. And now I have a working example about how to add icons :-)
Re: A command to get the list of recently opened files to open them [Solved]
Do you know whether is it possilbe to make this tab to have a correct name (i.e., "Search Results") _before_ the tab has been created?klownboy wrote: ↑16 Mar 2022 00:45Code: Select all
"Recent Locations|:find||1" goto "<get list_recentlocations>? /ln /silent=1";
The code below is for testing purposes. It works, but renaming takes effect _after_ the tab has been created. I wonder if there is a better approach:
Code: Select all
"Recent"
tab("new");
goto "<get list_recentlocations>? /ln /silent=1";
sortbylist <get list_recentlyopenedfiles>;
tab("rename", "Search Results");
tab("lock");
Re: A command to get the list of recently opened files to open them [Solved]
Create a new background tab and switch to it once all steps are done? You can't create a tab and give it a name in one step
One of my scripts helped you out? Please donate via Paypal
-
VeeGee
Re: A command to get the list of recently opened files to open them [Solved]
Not sure if this is correct, but I tried just this line :
and it created a new tab with the name I specified in a single step. I didn't see that as an option in the Help file, but tried it anyway.
Code: Select all
tab("new","I Like Pizza");
Re: A command to get the list of recently opened files to open them [Solved]
Thanks, but how can I switch to the background tab after all preparations are done? This seems to be obvious, but I don't see answer in the Help.
Is there something like "swich to a tab by its index"?
Code: Select all
"test"
tab("newb");
$newbindex = tab("get", "index") + 1;
tab("rename", "Search Results", $newbindex);
// <-- I need to switch to the background tab before using goto -->
goto "<get list_recentlyopenedfiles> ? /silent=1";
Re: A command to get the list of recently opened files to open them [Solved]
seltab?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 [Solved]
Duh, thanks! One another question if you have a minute.
What's wrong in the second line in the second block?
What's wrong in the second line in the second block?
Code: Select all
// to open a tab with recently opened files. the files are sorted in the
// order they were opened (the last opened file will be the topmost)
"recent files"
goto "<get list_recentlyopenedfiles> ? /silent=1";
sortbylist <get list_recentlyopenedfiles>;
// the same for folders
"recent folders"
goto "%SystemDrive% <get list_recentlocations> ? /silent=1 /ln";
sortbylist <get list_recentlocations> /n; // why doesn't it work?
Re: A command to get the list of recently opened files to open them [Solved]
Does that look like a valid path / quick search pattern? Nope^^
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 [Solved]
Well, but
This is why I expected that
sortbylist <get list_recentlyopenedfiles> works, isn't it?This is why I expected that
sortbylist <get list_recentlocations> or sortbylist <get list_recentlocations> /n (maybe with ? before /n) will do the same trick for folders. But it doesn't.Re: A command to get the list of recently opened files to open them [Solved]
I don't know what works on your system or not. Didn't see any examples, screenshots or gifs
sortbylist doesn't work with quick search patterns and apart from that, it won't filter by folders with trailing backslashes...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 [Solved]
It was another thread where I aksed how I can sort files in the order I have opened them.
Here it is, just in case: viewtopic.php?f=3&t=24447
jupe wrote:
Then open c1 with Sublime Text. You don't need to modify it. Just close it. Execute
******
I try to achieve the similar effect to sort folders. If I have visited some (or maybe created/changed some file inside it), the position of this folder should be changed to the topmost. For example, you have 3 folder:
Then you open Folder2. Or maybe you open Folder2 and modify some file inside it. Then you return to the Folder0 and execute
Here it is, just in case: viewtopic.php?f=3&t=24447
jupe wrote:
He was correct, this line works for me. Here is an example. Create the following 6 files:If you run this scriptsortbylist <get list_recentlyopenedfiles>;[...] I think it is what you are trying to explain you want.
Code: Select all
a1.txt
a2.txt
b1.exe
b2.exe
c1.txt
c2.txt
sortbylist <get list_recentlyopenedfiles>; from the address bar. The order of files will be changed to Code: Select all
c1.txt
a1.txt
a2.txt
b1.exe
b2.exe
c2.txt
I try to achieve the similar effect to sort folders. If I have visited some (or maybe created/changed some file inside it), the position of this folder should be changed to the topmost. For example, you have 3 folder:
Code: Select all
Folder0
|-- Folder1
|-- Folder2
|-- Folder3
sortbylist <get list_recentlocations> or something similar from the address bar. The order of folders should be changed toCode: Select all
Folder0
|-- Folder2
|-- Folder1
|-- Folder3
Re: A command to get the list of recently opened files to open them [Solved]
Real world examples^^
What does it contain and you did read that it won't filter by folders with trailing backslashes?^^
Code: Select all
<get list_recentlocations>One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club