help for sorting by file type then by date added #71
-
I have this file structure
I want to sort the folder 1.1 and 1.2 by date of creation And I want to sort the files within these folder by file type, so markdown files up top, then at the bottom all other file types. And I want this sorting to apply to all folders within the folder 1.1 and 1.2 if there are some. Is this possible ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @imeed166 at a glance everything you described can be configured. Push markdown files to the topBy default the matching is done against folder and file names, ignoring the file extension.
The little strange If a sorting specification for a folder comprises only the above line it will push to the top the markdown files, the rest of folder items (sub-folders and other files) will go below. No additional order specification will automatically apply the alphabetical order both to the markdown files group (pushed to the top) and to the remaining folder items Applying a sorting specification to multiple folders and their subfoldersA sorting specification can be applied to multiple target folders. Also, a specific syntax exists to express 'the folder and its direct sub-folders' (
specifies as a target the entire sub-tree of folders originating from Sorting by date of creationYou wrote:
it is unclear for me if it means:
If (A) is the case then the full sorting specification would look like: sorting-spec: |
target-folder: folder 1/folder 1.1/*
target-folder: folder 1/folder 1.2/*
> advanced created
/:files. ....md which can be read as: for all folders in the subtree of folders 'folder 1/folder 1.1/' and 'folder 1/folder 1.2/' the default sorting should be by 'creation date, advanced, descending (newest item in the top)'. Then in each folder in these subtrees the markdown files to be pushed to the top. If (B) is the case then the full sorting specification would look like: sorting-spec: |
target-folder: folder 1
> advanced created
target-folder: folder 1/folder 1.1/*
target-folder: folder 1/folder 1.2/*
/:files. ....md which can be read as: sort items in the folder 'folder 1' by 'creation date, advanced, descending (newest item in the top)'. And in all folders in the subtree of folders 'folder 1/folder 1.1/' and 'folder 1/folder 1.2/' push markdown files to the top.
Final remarksI hope I correctly guessed your intentions behind the question. |
Beta Was this translation helpful? Give feedback.
-
I'm actually using
I have a folder that already has a markdown file in it. When I create another markdown file in it, the folder moves to the bottom. Is this normal behaviour? Shouldn't the folder stay in the same place because the file I created is new and the sort should follow the oldest file in the folder like you said? If I need to create an issue or another discussion for this, tell me, I'll move it there. |
Beta Was this translation helpful? Give feedback.
Hi @imeed166
at a glance everything you described can be configured.
Let me go step by step:
Push markdown files to the top
By default the matching is done against folder and file names, ignoring the file extension.
If you want to match against the full file name (name + extension) you use the
/:files.
syntax (or the abbreviated variant/:.
)For example:
The little strange
....md
above is a result of concatenation of...
and.md
and it means 'any file name ending with .md'If a sorting specification for a folder comprises only the above line it will push to the top the markdown files, the rest of folder items (sub-folders and other files) will go below. No additional o…