Can I sort by Date Created first and then have the folder names in Alphabetical order?
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Can I sort by Date Created first and then have the folder names in Alphabetical order?
Hi!
I love this program. This might sound dumb but I can't find the solution.
I need to first sort by Date Created. This is fairly straight forward.
I then need to have the folder names in alphabetical order so I can keep similarly named properties together......but I need to see which one of those is the newest.
Example:
Bank1 Main Street
Bank1 Second Street
Bank2 Orange Street
Bank2 Maple Drive
I need to sort to see which Bank2 is the newest....but I need to keep all Bank2s together....if I sort by Date Created obviously it lists ALL the many folders in this order.... I need to keep them grouped together by name but have them in Date Created order
Hope this makes sense.
I love this program. This might sound dumb but I can't find the solution.
I need to first sort by Date Created. This is fairly straight forward.
I then need to have the folder names in alphabetical order so I can keep similarly named properties together......but I need to see which one of those is the newest.
Example:
Bank1 Main Street
Bank1 Second Street
Bank2 Orange Street
Bank2 Maple Drive
I need to sort to see which Bank2 is the newest....but I need to keep all Bank2s together....if I sort by Date Created obviously it lists ALL the many folders in this order.... I need to keep them grouped together by name but have them in Date Created order
Hope this makes sense.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
This would require a scripted custom column...
Execute
and then you can sort that column...
Execute
snippet; from the address bar and then paste this source code into it:Code: Select all
Snip: CustomColumn 1
XYplorer 23.70.0112, 14.10.2022 16:36:18
Action
ConfigureColumn
Caption
Bank folders sortable
Type
3
Definition
if (regexmatches(<cc_name>, "^bank")) {
return property("#date.m", <cc_item>);
}
Format
0
Trigger
0
Item Type
1
Item Filter
One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Thanks for the fast reply!!!!!!!!!!
I want to do this for ALL the folders in a given directory....the "Bank" was just an example.
What would I have to modify?
You're the best!
I want to do this for ALL the folders in a given directory....the "Bank" was just an example.
What would I have to modify?
You're the best!
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Why don't you say that in the first place?
Sort by "Name" first, hold shift, click on the "Created" column...
Configuration | General | Sort and Rename | Sort | Keep folders on topSort by "Name" first, hold shift, click on the "Created" column...
One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
I had tried this originally.
If I click by Name it definitely sorts them in order. When I hold the Shift key and hit Date Created the arrow will change from descending/ascending but none of the actual folders get sorted.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
And after setting the secondary sort order you've clicked on the date column to sort them by date?
One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Yes. so I open the program, click the Name column. All of the folders are ordered by A-Z correctly. I then hold the Shift key and click Date Created. A downward facing arrow appears now for that column as well.
so I am now showing an upward arrow for Names and a downward arrow for Date Created. The folders do not get re-sorted by Date Created or in any way.
I hope I am explaining this right....I'm losing hope.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Click on the date column header again...
One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
ok going back to your script. I think I will have to do it by that method. I have attached two files. The first is a list of folder names I'm trying it on. I changed "bank" to HGV in your original script. When I run your script the lines of text in the script pop up in the program window. I don't see it making another column.
I can just create scripts for the main folder names I need to run this for.
I can just create scripts for the main folder names I need to run this for.
To see the attached files, you need to log into the forum.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
No clue what you're showing there...
"When you run the script".
How do you run that?
It's meant to create a fully configured custom column. And that happens when you "import" it via the
"When you run the script".
How do you run that?
It's meant to create a fully configured custom column. And that happens when you "import" it via the
snippets; from the address bar...One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Correct. I input
snippet; from the address bar. It comes up with a window "Stepping through a script", I hit Continue, paste your script and hit OK. It goes back to the main program and there is no additional column. With the screenshot example I provided with my folder names, should I be able to replace "bank" with HGV from your original script?
I have tried multiple ways. After pasting and clicking OK with your script the window simply closes and I dont see any additional column.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Disable Menu - Scripting - Step Mode
Do it again...
Do it again...
One of my scripts helped you out? Please donate via Paypal
-
renamerbrian
- Posts: 7
- Joined: 14 Oct 2022 16:17
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
I disabled Step mode, did snippet; pasted script (with HGV instead of bank), hit OK. Goes back to main screen and no added Column (I promise I'm doing it step by step)
To see the attached files, you need to log into the forum.
-
highend
- Posts: 15005
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
You are NOT using
snippet; you're trying to execute a normal script.To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
python80
- Posts: 17
- Joined: 08 Jul 2022 05:49
- Location: Windows 10 Pro 22H2 win64 @100%
Re: Can I sort by Date Created first and then have the folder names in Alphabetical order?
Hi,
Is it possible to create a scripted custom column in XYplorer that displays and sorts by the earlier date between 'Date Created' and 'Date Modified'?
Specifically, for each item, the custom column should compare its creation date/time with its modified date/time, and then display whichever one is older (earlier in time).
Thanks in advance!
Is it possible to create a scripted custom column in XYplorer that displays and sorts by the earlier date between 'Date Created' and 'Date Modified'?
Specifically, for each item, the custom column should compare its creation date/time with its modified date/time, and then display whichever one is older (earlier in time).
Thanks in advance!
XYplorer Beta Club