Directory sorting
Directory sorting
Is there such a function?
Similar to Destop.ini, for example, there is an XYplorer.ini in the directory that stores the order of folders/files.
For example, there are six files in the directory:
A.txt
B.txt
C.txt
D.txt
E.txt
F.txt
The contents saved in XYplorer.ini are:
D.txt
C.txt
Then the order of directories is:
D.txt
C.txt
A.txt
B.txt
E.txt
F.txt
We can create an XYplorer. ini under any directory, and we can edit XYplorer. ini freely.
Similar to Destop.ini, for example, there is an XYplorer.ini in the directory that stores the order of folders/files.
For example, there are six files in the directory:
A.txt
B.txt
C.txt
D.txt
E.txt
F.txt
The contents saved in XYplorer.ini are:
D.txt
C.txt
Then the order of directories is:
D.txt
C.txt
A.txt
B.txt
E.txt
F.txt
We can create an XYplorer. ini under any directory, and we can edit XYplorer. ini freely.
Re: Directory sorting
Yes you could script this, lookup the scripting command sortbylist (I made a quick example below).
Also a similar feature FYI:
https://www.xyplorer.com/release_14.30.php#PCSO
https://www.xyplorer.com/release_16.60.php#PCSO
Code: Select all
sortbylist(readfile("sortorder.ini"));
https://www.xyplorer.com/release_14.30.php#PCSO
https://www.xyplorer.com/release_16.60.php#PCSO
Re: Directory sorting
And please don't name these files "XYplorer.ini"^^
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Directory sorting
In the meantime I updated the screenshots in release_16.60.php. They are still blank release_14.30.php. (Some criminal lawyers from Hamburg had sued me for using some photos in the thumbs shown in the screenshots... )jupe wrote: ↑01 Oct 2019 08:59 https://www.xyplorer.com/release_14.30.php#PCSO
https://www.xyplorer.com/release_16.60.php#PCSO
FAQ | XY News RSS | XY Twitter
Re: Directory sorting
Thanks very much.
If I use scripts, can the XYplorer execute the specified scripts automatically after I click on a folder?
Every time a folder is opened, the specified script is executed manually, which is inconvenient.
If I use scripts, can the XYplorer execute the specified scripts automatically after I click on a folder?
Every time a folder is opened, the specified script is executed manually, which is inconvenient.
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Directory sorting
How many folders do you have that need a custom sort order?
FAQ | XY News RSS | XY Twitter
Re: Directory sorting
In work, many folders need to be categorized. (Classify folders. It's not just files..)
Besides, my stronger need is:
When I browse the Internet, I will screen-capture good articles and materials, there will be more than a dozen or dozens of files in the folder, I hope to sort by category.
I also have a strong need:
There can be some horizontal splitting in the file list. Just like in the menu, it's easy to add a dividing line, which is to use "-".
Besides, my stronger need is:
When I browse the Internet, I will screen-capture good articles and materials, there will be more than a dozen or dozens of files in the folder, I hope to sort by category.
I also have a strong need:
There can be some horizontal splitting in the file list. Just like in the menu, it's easy to add a dividing line, which is to use "-".
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Directory sorting
If that's a strong need you should probably look somewhere else. XYplorer won't have this kind grouping too soon.
FAQ | XY News RSS | XY Twitter
Re: Directory sorting
1. This function was implemented half a year ago, but it is not perfect.
Half a year ago, in order to achieve the custom sorting of folders and add dividing lines, I wrote a script of about 4KB, which was implemented with PaperFolder.
I placed a file in the folder that needed sorting, such as "SortOrder.txt", and I right-clicked in the margin of the list, clicked on the first item, and the folder was sorted. But I don't think it's perfect enough.
2. "Manual Sorting" seems to be a problem
For example, there are three folders:
Step 1: Download the software
Step 2: Set Tools|Customize List|Manual Sorting
Step 3: Move folder 222 to front of folder 111
Step 4: Open folder 111, then click the "Up" button to return to the previous directory.
Now folder 111 is in front of folder 222.
In fact, this is a very good function, and maybe many users will give up this function just like me.
3. It is not difficult to realize this function.
As we all know, in Explorer, there is "Desktop.ini" to achieve personalized functions, such as changing the folder icon.
XYplorer can also have "SortOrder.ini".
For example, the content in "SortOrder.ini" is as follows:
Each time a folder is opened, XYplorer determines whether there is a "SortOrder.ini" file under the folder, and if so, execute the script "sortbylist".
1、这个功能半年前实现了,只是不完美
半年前,为了实现文件夹的自定义排序,以及增加分割线,我写了大概4KB的脚本,用PaperFolder实现了。
我在需要排序的文件夹中放了一个文件,例如“SortOrder.txt”,我在列表的空白处点击右键,点击第一项,文件夹就排序好了。
只是我觉得这样还不够完美。
2、“Manual Sorting”好像有点问题
例如,有3个文件夹:
第1步:下载软件
第2步:设置Tools|Customize List|Manual Sorting
第3步:移动文件夹222到文件夹111的前面
第4步:打开文件夹111,然后点击“Up”按钮返回上一级目录。
现在文件夹111在文件夹222的前面。
其实这是一个非常棒的功能,可能很多使用者会跟我一样放弃了这个功能。
3、实现这个功能不难
众所周知,在Explorer中有“Desktop.ini”,实现个性化的功能,比如更改文件夹的图标。
XYplorer也可以有“SortOrder.ini”。
例如“SortOrder.ini”中的内容是这样的:
每次打开文件夹的时候,XYplorer判断该文件夹下是否有“SortOrder.ini”文件,如果有的话,执行脚本“sortbylist”即可。
Half a year ago, in order to achieve the custom sorting of folders and add dividing lines, I wrote a script of about 4KB, which was implemented with PaperFolder.
I placed a file in the folder that needed sorting, such as "SortOrder.txt", and I right-clicked in the margin of the list, clicked on the first item, and the folder was sorted. But I don't think it's perfect enough.
2. "Manual Sorting" seems to be a problem
For example, there are three folders:
Code: Select all
111
222
333
Step 2: Set Tools|Customize List|Manual Sorting
Step 3: Move folder 222 to front of folder 111
Step 4: Open folder 111, then click the "Up" button to return to the previous directory.
Now folder 111 is in front of folder 222.
In fact, this is a very good function, and maybe many users will give up this function just like me.
3. It is not difficult to realize this function.
As we all know, in Explorer, there is "Desktop.ini" to achieve personalized functions, such as changing the folder icon.
XYplorer can also have "SortOrder.ini".
For example, the content in "SortOrder.ini" is as follows:
Code: Select all
222
- // Use '-' to increase the dividing line
111
333
1、这个功能半年前实现了,只是不完美
半年前,为了实现文件夹的自定义排序,以及增加分割线,我写了大概4KB的脚本,用PaperFolder实现了。
我在需要排序的文件夹中放了一个文件,例如“SortOrder.txt”,我在列表的空白处点击右键,点击第一项,文件夹就排序好了。
只是我觉得这样还不够完美。
2、“Manual Sorting”好像有点问题
例如,有3个文件夹:
Code: Select all
111
222
333
第2步:设置Tools|Customize List|Manual Sorting
第3步:移动文件夹222到文件夹111的前面
第4步:打开文件夹111,然后点击“Up”按钮返回上一级目录。
现在文件夹111在文件夹222的前面。
其实这是一个非常棒的功能,可能很多使用者会跟我一样放弃了这个功能。
3、实现这个功能不难
众所周知,在Explorer中有“Desktop.ini”,实现个性化的功能,比如更改文件夹的图标。
XYplorer也可以有“SortOrder.ini”。
例如“SortOrder.ini”中的内容是这样的:
Code: Select all
222
- // 用“-”来增加分割线
111
333
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Directory sorting
Manual Sorting is stored per tab, not per folder.
FAQ | XY News RSS | XY Twitter
Re: Directory sorting
Could you explain it, please? I really don't understand.
"Since v16.60 there is Permanent Custom Sort Order (PCSO): The custom sort order is remembered per tab, across tab switches, and across sessions, and on an explicit List Refresh."
I read the help document, but I still don't understand it.
Re: Directory sorting
My understanding is as follows:
There is a tab A showing three folders:
Step 1: Set Tools|Customize List|Manual Sorting
Step 2: Move folder 222 to the front of folder 111.
Step 3: Now switch to tab B.
Step 4: Switch to tab A.
Now folder 222 is in front of folder 111.
Step 5: Open folder 111, then click the "Up" button to return to the previous directory.
Now folder 111 is in front of folder 222.
But.
This is only a little useful. It's not very useful.
When I was looking for a job 10 years ago, I contacted my HR. There were many folders under one of her folders. This method was used to sort folders.
If one day, she needs to adjust the order of folders, rename folder 12-DDD to 03-DDD, then some shortcuts(*.lnk) may fail. (The previously saved shortcuts will fail, and clicking on the shortcuts will not find the path.) But in fact, folder names are all DDD, adding some numbers just for sorting.
There is a tab A showing three folders:
Code: Select all
111
222
333
Step 2: Move folder 222 to the front of folder 111.
Step 3: Now switch to tab B.
Step 4: Switch to tab A.
Now folder 222 is in front of folder 111.
Step 5: Open folder 111, then click the "Up" button to return to the previous directory.
Now folder 111 is in front of folder 222.
But.
This is only a little useful. It's not very useful.
When I was looking for a job 10 years ago, I contacted my HR. There were many folders under one of her folders. This method was used to sort folders.
Code: Select all
01-CCC
02-AAA
11-HHH
12-DDD
Re: Directory sorting
in my opinion for what you are trying to achieve you would be better using an Extra "soft column", and tagging each file with an index number, then you will have a column to sort by that will be permanent, and won't require an external file in each folder, won't require renaming files, and can be remembered on location or tab changes, and even permanently saved as the default sorting method via FVS
https://www.xyplorer.com/release_13.80.php#ExtraTags
https://www.xyplorer.com/release_13.80.php#ExtraTags
Re: Directory sorting
Before adjusting the order:
After adjusting the order:
According to your method, folder EEE, folder BBB, folder CCC and folder DDD need to be re marked.
It takes a lot of time if there are more than ten folders that need to be re marked.
Code: Select all
AAA (Marked as: 1)
BBB (Marked as: 2)
CCC (Marked as: 3)
DDD (Marked as: 4)
EEE (Marked as: 5)
Code: Select all
AAA (Marked as: 1)
EEE (Marked as: 2)
BBB (Marked as: 3)
CCC (Marked as: 4)
DDD (Marked as: 5)
It takes a lot of time if there are more than ten folders that need to be re marked.
Last edited by MrYang on 02 Oct 2019 10:32, edited 1 time in total.