Custom column to re-arrange date format in Folder name

Discussion related to "Everything" 1.5.
Post Reply
tollyboss
Posts: 18
Joined: Sun Apr 12, 2020 6:55 am

Custom column to re-arrange date format in Folder name

Post by tollyboss »

I have folders with date format dd-MM-yyyy eg: 01-02-2025.
Now I need a custom column which re-arranges the folder name to yyyy-mm-dd -> 2025-02-01.
Can anyone please help me on achieving this?
Thank you.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Custom column to re-arrange date format in Folder name

Post by NotNull »

Are you using Everthing 1.4 or 1.5? Cusom columns indicate 1.5, but you posted in the 1.4 forums.

Assuming 1.5, some examples:

Code: Select all

wildcards:name:##-##-#### addcol:A A:=$name: a-format:YYYY-MM-DD
regex:\d\d-\d\d-\d\d\d\d addcol:A A:=$name: a-format:YYYY-MM-DD
regex:\d\d-\d\d-\d\d\d\d addcol:A A:=$name: a-format:YYYY-MM-DD


Consider renaming your folders:
- Search for
folder: wildcards:name:##-##-####

- Select all folders (CTRL + A)
- Press F2
- Uncheck all checkboxes
- Old format:
%1-%2-%3

- New format:
%3-%2-%1

- Check if results are as expected
- OK

(Make sure no files are opened in these folders as that would make renaming impossible)
tollyboss
Posts: 18
Joined: Sun Apr 12, 2020 6:55 am

Re: Custom column to re-arrange date format in Folder name

Post by tollyboss »

First of all thank you so much for providing solution. I experimented with regex-replace, regex-extract and what not since yesterday with my almost zero knowledge on regex syntax usage in everything. Never knew it's this simple.
And yes I use 1.5a, I thought I should post queries in support page for both versions. I shall keep this in mind from next time.
Yes, It would've been much easier to rename folder names, but I have my own reasons to keep them as it is. So that's why I was searching for a temporary alternative to sort folders chronologically.

And coming to whether it served my purpose? Actually no, though the custom column provides folder names in yyyy-mm-dd format, but when I sort by this column it still sorts in the order as if the old dd-mm-yyyy format.
Am I missing something? Was my approach to this problem incorrect?
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Custom column to re-arrange date format in Folder name

Post by NotNull »

These searches don't change the actual values, just the presentations on screen.
Should have considered that you would like to sort by this column ...

This one should do better:

Code: Select all

regex:^(\d\d)-(\d\d)-(\d\d\d\d)$ addcol:A A:=$3:\-$2:\-$1: 


@void:
- Looks like the S1: .. $3: optimizes away the leading zeros
- wildcards:<filename pattern> no longer works; now needs wildcards:name:<filename pattern>
tollyboss
Posts: 18
Joined: Sun Apr 12, 2020 6:55 am

Re: Custom column to re-arrange date format in Folder name

Post by tollyboss »

Thank you so much once again.
Now I'm able to sort chronologically using the custom column.
However like mentioned in the end note, Custom column values were 2025-2-01 and so on.
I added a-format:YYYY-MM-DD at the end to get 2025-02-01.

Btw is there a way to save this column. So that I can use it again later by selecting it from the add column section ( I know we can save it in filters. Looking for another answer)
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Custom column to re-arrange date format in Folder name

Post by NotNull »

tollyboss wrote: Thu Feb 13, 2025 4:44 pm Btw is there a way to save this column.
Not as far as I know. Bookmarks and Filters are the way to go here.
Post Reply