ListManagementHouseCleaning

Discuss and share scripts and script files...
klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hi hermhart, I never gave the Sticky Section business a thought since I wasn't using it (obviously from my initial response) so I wasn't having any issues with the sticky business going away when using ListManagementHouseCleaning. I noticed after you brought it up that Stef123 had mentioned that to Sammay in the other thread. Thanks for the words of encouragement. I'll be taking a closer look at the script this weekend.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Stef123

Re: ListManagementHouseCleaning

Post by Stef123 »

On a sidenote - to helmhart and others who shy away from Sammay's "brute force attack":
as an alternative to the sticky section, you could "park" your keepers in the info-text that comes with many dialogs (the blue-circled i in the lower left). There is no direct way (yet) of editing those texts, so here are two workarounds:
http://www.xyplorer.com/xyfc/viewtopic. ... e&start=15
http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=11423

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Well I finally got a new version working. This one will recognize the Sticky Sections for any List Management items with MRUs and leave them be. The trick was to obtain the new modified list first - all formatted and ready for pasting - before entering into the List Management dialogs. The script retrieves the list from XYplorer.ini file using SC getsectionlist and formats it (i.e., strips out the "Count=" line, gets rid of the keys, like "LookIn5=", and removes the mru lines after the "-----> mru" line if it exists. I'll test some more before posting hopefully tomorrow. As of now I plan on keeping the 3 MRUs, RenameSpecial, mruBatchRename, mruRegExpRename in the edit list dialog not in the auto clear list dialog. Those seem too important to wipe out (clear) if someone does not have sticky sections established.

By the way Sammay and highend, I didn't notice SC getSectionList in the Undocumented Script Commands unless I flat out missed it. http://www.xyplorer.com/xyfc/viewtopic. ... st#p119318

Code: Select all

text getsectionlist("General");
text getsectionlist();
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: ListManagementHouseCleaning

Post by highend »

I didn't notice SC getSectionList in the Undocumented Script Commands
Why should it be there, it's documented in the .chm file xD
he script retrieves the list from XYplorer.ini file using SC getsectionlist and formats it (i.e., strips out the "Count=" line, gets rid of the keys, like "LookIn5=", and removes the mru lines after the "-----> mru" line if it exists
Should I take a look at it for some optimization?
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Oops sorry, one of those cases where I looked and didn't see. I must have looked right after get and didn't look far enough downstream. Thanks highend.
Yes, I'm sure that portion of the script that cleans up the results of SC getsectionlist could use a little tender loving regex. It didn't take much - a couple of nested gettokens and formatlist, but I'm sure it could be optimized. It's actually quite fast since it's not working on a huge list. So it's probably not worth sending it to you. If you have time, you can take a quick look at that section when I post it probably tomorrow. Thanks.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: ListManagementHouseCleaning

Post by hermhart »

klownboy,

Were you still thinking of updating/posting this with the new changes that you were previously talking about (retaining areas with MRU's)?

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hi hermhart, yes I'll post revision 2.2 today. Some non-computer related events got in my way of posting last week. It seems to be working fine though recognizing the mru line if present and only deleting those items after it.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Posted version 2.2 of ListManagementHouseCleaning. Please see the first post. As requested it now recognizes the Sticky Section if present in an mru list and will not delete it. Thanks.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: ListManagementHouseCleaning

Post by hermhart »

Thanks klownboy!

Stef123

Re: ListManagementHouseCleaning

Post by Stef123 »

klownboy wrote:Posted version 2.2 ...it now recognizes the Sticky Section if present in an mru list and will not delete it.
Sounds good, but on my very first tentative trial it completely erased all entries of FindFiles: Name
Not a big loss, that's why I tried it with something unimportant first.

Tried it again by entering a few items in the now empty FindFiles:Name list #615;
Verified via FindFiles Dropdown that the colored sticky entries do exist, then ran your script again.
Same thing, it erases the whole thing. :(

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Stef123 what's your mru line(s) look like? Is it exactly like Don has it in the help file - which is "-----> mru" (5 dashes right arrow space mru - without quotes)? I ask because that's what the script looks for. Is yours is something different? That may be the reason or my check for that match is too specific and needs to be more generic (e.g., wildcards). I had tested it numerous times on "Find files: Name" and it worked fine for me. I should have stated in the post to make a backup of your ini file also and try it first on only one item or two...meant to. Sorry and thanks for the feedback.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Stef123

Re: ListManagementHouseCleaning

Post by Stef123 »

klownboy wrote:Stef123 what's your mru line(s) look like? Is it exactly like Don has it in the help file - which is "-----> mru" (5 dashes right arrow space mru - without quotes)?
Yes, exactly. To be sure it is properly recognized, I checked it in the dropdown, and sure enough, the sticky items are colored differently, so it seems the mru-section is as it should be.

So you're saying you cannot reproduce it, Ken?
I am on 15.60.0016 when I run version 2.2 of your script. Step by step:
1) Disable/ unselect all checkboxes via right-click "Uncheck ALL"
2) Enable FindFiles: Name
3) Click OK
4) Press Cancel to cancel out of the next dialog; nothing I want to modify here.
5) Click Yes to save the changes

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: ListManagementHouseCleaning

Post by hermhart »

klownboy,

It is working great on my end. The only thing that it does is that for some reason on the Find Files List Management it adds an empty line to the top of the list above my MRU's. But I can live with that.

Thanks again!

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hey Stef123, I just ran it again following the same steps you laid out and it worked fine. I checked the script, it's essentially looking for *-> mru* incase someone didn't use the specified five dashes. You do have a space between the right arrow and mru? If you get a chance, could you try changing line 105 to read $mrutext = "mru"; So then the script would simply be looking for mru wildcarded. Thanks. When I ran it, I was left with...

Code: Select all

* /ed  //find all empty folders
* /ef  //find all empty files
* *  //Find files and folders with spaces
-----> mru
Hi hermhart glad it's working, though I would like to figure out why you're left with a blank top line. I'll check it out. I'm not sure why it would be happening on your system, but I should be able to strip out blank lines. Thanks.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: ListManagementHouseCleaning

Post by bdeshi »

Same as Stef here ... see next post.

btw, Are you safe and sound on Windows 10 now? if you are, do you see the bells correctly? I still get rects here in the 2nd list.

edit: a suggestion: if both lists were cancelled, the save settings notice should not come up.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply