Author Topic: Automatically re-sorts files doesn't work. Bug?  (Read 74 times)

culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Automatically re-sorts files doesn't work. Bug?
« on: Yesterday at 10:54:38 »
I've got checked box in:
Explorer Panel Settings > Sorting and Columns > Automatically re-sorts files and folders after a manual rename operation.
but that doesn't work.

I mean, I change file name from b_something to d_something and it stays in the file list at the same position, instead of moving down.
I need to refresh view.
Same with folders.

Is there any other setting I should tick?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4967
    • View Profile
    • Multi Commander
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #1 on: Yesterday at 11:21:49 »
As much changes that the latest release had I would not be surprised if that broke.  I will check later today

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4967
    • View Profile
    • Multi Commander
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #2 on: Yesterday at 12:52:04 »
No. it re-sort for me when I rename a file.. You sure you are sorting on name column ? (I made the mistake my self first to not switch to sort by 'name' )
it is normal filesystem. not inside a virtual one like FTP or something ? can you describe how you do the rename (There are many multiple way to do rename in MC) .
« Last Edit: Yesterday at 13:35:44 by Mathias (Author) »

culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #3 on: Yesterday at 13:47:25 »
Yes, sorting on Name column checked.
Tried renaming by:
- clicking on file (Windows explorer style)
- Rename current file/folder
- by custom:
  #options (RunSeparate)
  MC.Filesystem.Rename ASKNAME

Effect is always the same - name is changed, nothing happens with sorting, but after refreshing view or refocusing MC, list is resorted.

Files on hard drive, inside system (like Download folder), no virtual or net.
« Last Edit: Yesterday at 14:01:41 by culturework »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4967
    • View Profile
    • Multi Commander
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #4 on: Yesterday at 18:28:48 »
Strange. I can't make it not work.
Try turning the option "Automatically re-sort...." Off.. then save setting..  and then turn it back on again and save settings


culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #5 on: Today at 11:10:42 »
I did some testing, results:

1.  issue affects only the portable version (MC 16.x and 15.x, haven't used earlier versions), tested with Windows 11 Home, Windows 10 Home, Windows 10 Pro (user account only for the last one); Full installer version works ok with Windows 10/11 Home, didn't try with W10 Pro.

2. turning "Automatically re-sorts files..." on/off with applying, saving, restarting MC in different combinations doesn't help;

3. there is really strange behavior in portable; steps to reproduce:

Open a folder sorted by Name, with setting "Automatically re-sorts files..." checked on.
1. Rename file A to B.
The file does not move to its correct alphabetical position.
After refreshing the panel, the file immediately moves to the correct position (this step isn't necessary, just as a confirmation of alphabetical sorting).
2. Rename the same file B back to A.
Again, it does not move automatically.
3. Repeat the rename (A -> B) on the same file.
Now the file is repositioned automatically without requiring a refresh.

It appears that after the first renaming (A -> B -> A), Multi Commander "learns" how to update that file position correctly. MC "remembers" that file till you rename something else, then it "forgets" auto-sorting for the given file.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4967
    • View Profile
    • Multi Commander
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #6 on: Today at 14:06:30 »
I did some testing, results:

1.  issue affects only the portable version (MC 16.x and 15.x, haven't used earlier versions), tested with Windows 11 Home, Windows 10 Home, Windows 10 Pro (user account only for the last one); Full installer version works ok with Windows 10/11 Home, didn't try with W10 Pro.

2. turning "Automatically re-sorts files..." on/off with applying, saving, restarting MC in different combinations doesn't help;

3. there is really strange behavior in portable; steps to reproduce:

Open a folder sorted by Name, with setting "Automatically re-sorts files..." checked on.
1. Rename file A to B.
The file does not move to its correct alphabetical position.
After refreshing the panel, the file immediately moves to the correct position (this step isn't necessary, just as a confirmation of alphabetical sorting).
2. Rename the same file B back to A.
Again, it does not move automatically.
3. Repeat the rename (A -> B) on the same file.
Now the file is repositioned automatically without requiring a refresh.

It appears that after the first renaming (A -> B -> A), Multi Commander "learns" how to update that file position correctly. MC "remembers" that file till you rename something else, then it "forgets" auto-sorting for the given file.

No. Can't reproduce that.. works for me. even with refresh portable.
Is it normal filesystem ? network ? it is almost like something is blocking the filesystem change notification from being sent to MC.

If you in Core settings got to log tab and enable

FileSystem log and set LogLevel to "debug / Full"

then restart and press ctrl+L, and select FileSystem Log ,  Right click and select clear.
the do the rename.

I get
2026-07-18 14:05:42.558 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\b.log
2026-07-18 14:05:42.563 [103264] FSMonitor : File Added - E:\delme\z.log already exists in cache, No need to rescan
2026-07-18 14:05:44.237 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\z.log
2026-07-18 14:05:44.240 [103264] FSMonitor : File Added - E:\delme\a.log already exists in cache, No need to rescan
2026-07-18 14:05:45.757 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\a.log
2026-07-18 14:05:45.760 [103264] FSMonitor : File Added - E:\delme\z.log already exists in cache, No need to rescan
2026-07-18 14:05:49.220 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\z.log
2026-07-18 14:05:49.226 [103264] FSMonitor : File Added - E:\delme\a.log already exists in cache, No need to rescan
2026-07-18 14:05:52.932 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\a.log
2026-07-18 14:05:52.937 [103264] FSMonitor : File Added - E:\delme\g.log already exists in cache, No need to rescan
2026-07-18 14:05:54.461 [64308] ChangeNotifications - FILE RENAMED, REMOVE OLD : E:\delme\g.log
2026-07-18 14:05:54.464 [103264] FSMonitor : File Added - E:\delme\z.log already exists in cache, No need to rescan

So do you get the "ChangeNotifications " items ?


culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #7 on: Today at 15:02:27 »
folder:
bfile.xlsx
dfile.xlsx
gfile.xlsx

steps:
dfile -> afile (didn't autosort)
afile -> zfile (didn't autosort)
zfile -> afile (autosort happend)

2026-07-18 14:56:50.701 [5816] ChangeNotifications - FILE RENAMED, REMOVE OLD : C:\testfolder\dfile.xlsx
2026-07-18 14:56:50.711 [5028] FSMonitor : File Added - C:\testfolder\afile.xlsx already exists in cache, No need to rescan
2026-07-18 14:57:09.313 [5816] ChangeNotifications - FILE RENAMED, REMOVE OLD : C:\testfolder\afile.xlsx
2026-07-18 14:57:09.313 [5028] FSMonitor : File Added - C:\testfolder\zfile.xlsx already exists in cache, No need to rescan
2026-07-18 14:57:17.340 [5816] ChangeNotifications - FILE RENAMED, REMOVE OLD : C:\testfolder\zfile.xlsx
2026-07-18 14:57:17.340 [5816] ChangeNotifications - FILE MODIFIED : C:\testfolder\afile.xlsx
2026-07-18 14:57:17.340 [5028] FSMonitor : File Added - C:\testfolder\afile.xlsx already exists in cache, No need to rescan
2026-07-18 14:57:17.340 [5028] FSMonitor : File Modified - Update of fileitem needed : C:\testfolder\afile.xlsx
2026-07-18 14:57:17.905 [5028] OnChangeEvent - View : 0000021FFE0B7220 - Event : 'Path Updated' - FileItem 0000021F81B2BB20
2026-07-18 14:57:17.905 [5028] (view=0000021FFE0B7220) BrowsePath requested : 0000021F81B2BB20 = C:\testfolder
2026-07-18 14:57:17.905 [5028] FileItem have NeedRescan flag set : 'C:\testfolder'
2026-07-18 14:57:17.905 [5028] Filesystem volume scan is required : 'C:\testfolder'
2026-07-18 14:57:17.905 [5028] Unregister all FileSystemChange events - View : 0000021FFE0B7220 , FileItem : 0000021F81B2BB20
2026-07-18 14:57:17.905 [5028] FileItem - UpdateLock ON : 0000021F81B2BB20 = 'C:\testfolder'
2026-07-18 14:57:17.905 [5028] ThreadWorkManager [Icon] - Request STOP - Current state : Stopped
2026-07-18 14:57:17.905 [5028] Main Async FileSystem Scanner thread is not busy, So use it.
2026-07-18 14:57:17.905 [5028] File System Scanning Thread is waiting, Signal it to start (Thread ID: 17700)!
2026-07-18 14:57:17.905 [17700] Init FileSystem Scanning of path : C:\testfolder
2026-07-18 14:57:17.905 [17700] FileSystem Volume Scanning started : 0000021F81B2BB20 = C:\testfolder
2026-07-18 14:57:17.905 [5028] Leaving BrowsePath - Will wait for scan to complete (If scan was started)
2026-07-18 14:57:17.905 [5028] OnChangeEvent - View : 0000021F81AFECC0 - Event : 'Path Updated' - FileItem 0000021F81B2BB20
2026-07-18 14:57:17.905 [5028] (view=0000021F81AFECC0) BrowsePath requested : 0000021F81B2BB20 = C:\testfolder
2026-07-18 14:57:17.905 [5028] FileItem update is still in progress. Waiting before using cached children : 'C:\testfolder'
2026-07-18 14:57:17.906 [17700] FileSystem Scanner : Found item '..' 0x00000016
2026-07-18 14:57:17.906 [17700] FileSystem Scanner : Found item 'afile.xlsx' 0x00000020
2026-07-18 14:57:17.906 [17700] FileSystem Scanner : Found item 'bfile.xlsx' 0x00000020
2026-07-18 14:57:17.906 [17700] FileSystem Scanner : Found item 'gfile.xlsx' 0x00000020
2026-07-18 14:57:17.906 [5028] Unregister all FileSystemChange events - View : 0000021F81AFECC0 , FileItem : 0000021F81B2BB20
2026-07-18 14:57:17.906 [5028] Scanning CANCELED! Path is already locked for scanning! ( C:\testfolder )
2026-07-18 14:57:17.906 [5028] (this=0000021F81AFECC0) (GUI) FileSystem Explorer had UPDATELOCK....
2026-07-18 14:57:17.906 [17700] FileSystem Volume Scanning completed
2026-07-18 14:57:17.906 [17700] FileSystem scanning process completed
2026-07-18 14:57:17.906 [5028] Leaving BrowsePath - Will wait for scan to complete (If scan was started)
2026-07-18 14:57:17.906 [17700] File System Scanning Thread done - Will wait for next scan job (17700)
2026-07-18 14:57:17.910 [5028] Update of BrowseCache started ( parent : C:\testfolder , Valid : 4 , Removed : 0 , New 0 )
2026-07-18 14:57:17.910 [5028] (View=0000021FFE0B7220) Updating FileSystem View - Starting
2026-07-18 14:57:17.910 [5028] (view=0000021FFE0B7220) Insert from BrowseCache into VIEW - Existing Items : 0 , Items to Add : 4, Cache for path : C:\testfolder
2026-07-18 14:57:17.910 [5028] Register for FileSystemChange events - View : 0000021FFE0B7220 , FileItem : 0000021F81B2BB20 , Events : 0x2f83000
2026-07-18 14:57:17.910 [5028] (View=0000021FFE0B7220) Updating FileSystem View - Done
2026-07-18 14:57:17.910 [5028] IconExtractorWork - Add C:\testfolder to Icon Extract queue
2026-07-18 14:57:17.910 [5028] Background Thread - Start Job ( JobName : Icon Extractor , CMD : Cmd_None , CurrentState : Stopped)
2026-07-18 14:57:17.910 [5028] Background Thread - Start - Thread state is STOPPED. Queueing job
2026-07-18 14:57:17.910 [5028] FileSystem Scanning and Caches and UI update completed
2026-07-18 14:57:17.910 [21808] _WorkerThreadProc - Signal received, Lets work
2026-07-18 14:57:17.910 [21808] Background Thread [Icon Extractor] - Starting
2026-07-18 14:57:17.910 [21808] Icon Extractor - Get Icons for path : C:\testfolder\
2026-07-18 14:57:17.910 [21808] Icon Extractor - Begin (file icons)
2026-07-18 14:57:17.910 [21808] Icon Extractor - Done - 0 icons changed
2026-07-18 14:57:17.910 [21808] Icon Extractor - Begin (overlay icons)
2026-07-18 14:57:17.915 [21808] Icon Extractor - Done - 0 icons changed
2026-07-18 14:57:17.915 [21808] Background Thread - Work finished or stopped (Signaled : 0)
2026-07-18 14:57:17.915 [21808] _WorkerThreadProc - Jobb Name : Icon Extractor , Thread Jobb State : Stopped
2026-07-18 14:57:17.915 [21808] _WorkerThreadProc - Wait for signal
2026-07-18 14:57:17.915 [5028] FileItem - UpdateLock OFF : 0000021F81B2BB20 =' C:\testfolder'
2026-07-18 14:57:18.018 [5028] (this=0000021F81AFECC0) (GUI) FileSystem Scanning is Completed.
2026-07-18 14:57:18.018 [5028] Update of BrowseCache started ( parent : C:\testfolder , Valid : 0 , Removed : 0 , New 0 )
2026-07-18 14:57:18.018 [5028] (View=0000021F81AFECC0) Updating FileSystem View - Starting
2026-07-18 14:57:18.018 [5028] (view=0000021F81AFECC0) Insert from BrowseCache into VIEW - Existing Items : 0 , Items to Add : 4, Cache for path : C:\testfolder
2026-07-18 14:57:18.018 [5028] Register for FileSystemChange events - View : 0000021F81AFECC0 , FileItem : 0000021F81B2BB20 , Events : 0x2f83000
2026-07-18 14:57:18.018 [5028] (View=0000021F81AFECC0) Updating FileSystem View - Done
2026-07-18 14:57:18.018 [5028] FileSystem Scanning and Caches and UI update completed

culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #8 on: Today at 15:04:12 »
normal filesystem, 3 different machines and same problem

culturework

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #9 on: Today at 15:46:25 »
OK, I've tried with my config backup restored into fresh MC.
There needs to be sth with configuration. Totally fresh install/portable don't do that, but with my configuration backup restored into them, that problem appears. Even on installed.
 :)
So, as I asked in the first post - is there any other setting that matters here? I had to overlook something during configuration.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4967
    • View Profile
    • Multi Commander
Re: Automatically re-sorts files doesn't work. Bug?
« Reply #10 on: Today at 19:54:27 »
OK, I've tried with my config backup restored into fresh MC.
There needs to be sth with configuration. Totally fresh install/portable don't do that, but with my configuration backup restored into them, that problem appears. Even on installed.
 :)
So, as I asked in the first post - is there any other setting that matters here? I had to overlook something during configuration.

Not that I can think of. So might be some weird none logical conflict between some settings. not sure what that can be