Hi,
Sometimes a user needs to edit manually the wincmd.ini file.
wincmd.ini includes dozens of sections with hundreds of lines (settings).
When Total Commander saves the changes made to the file wincmd.ini, it also changes the position of some sections and/or settings in wincmd.ini.
I suggest always to save all sections (with their relevant settings) in the alphabetical order (A-Z).
Example:
[1600x900 (8x16)]
CompareDivider=500
CompareDX=120
..............
FontName=Microsoft Sans Serif
FontNameDialog=Microsoft Sans Serif
.............
x=288
y=19
[Associations]
.....
[Colors]
ActiveTitle=8388608
ActiveTitleText=16777215
BackColor=-1
............
wincmd.ini: Sort a list of settings in alphabetical order
Moderators: white, Hacker, petermad, Stefan2
It would be nice, but I doubt it's possible. AFAIK TC just calls WritePrivateProfileString API function which does all the writing to the file; it's probably also responsible for moving whole sections within the file (not sure about that, but it's an educated guess).
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
misvin,
Here is a short AHK script that sorts the .ini file. Test on a backup first.
HTH
Roman
Here is a short AHK script that sorts the .ini file. Test on a backup first.
Code: Select all
#NoEnv
IniFileName = C:\Program Files\Totalcmd\wincmd.ini
IniRead, SectionNames, %IniFileName%
Sort, SectionNames, CL
Loop, Parse, SectionNames, `n
{
IniRead, Section, %IniFileName%, %A_LoopField%
Sort, Section, CL
NewIni = %NewIni%[%A_LoopField%]`n%Section%`n`n
}
StringTrimRight, NewIni, NewIni, 1
FileDelete, %IniFileName%
FileAppend, %NewIni%, %IniFileName%
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
I have sorted manually all settings (thanks to Excel ) and saved the wincmd.ini file.Hacker wrote:misvin,
Here is a short AHK script that sorts the .ini file. Test on a backup first.
But next time when I run TC, the alphabetical order (A-Z) is corrupted because of [lefttabs] and [righttabs] sections, and because of other settings.
Please note that TC should be closed before I edit wincmd.ini.
misvin,
Roman
Yes, that's why the script can come in handy.I have sorted manually all settings (thanks to Excel ) and saved the wincmd.ini file.
But next time when I run TC, the alphabetical order (A-Z) is corrupted because of [lefttabs] and [righttabs] sections, and because of other settings.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
misvin,
I don't think that such thing will be ever integrated into official TC release because it is not required for normal TC work, order of INI entries have no impact on TC work. I can only suggest to have such script somewhere and run it when you need to edit wincmd.ini if you really want to see entries sorted alphabetically (I prefer to see more important sections first, e.g. [Configuration]).
I don't think that such thing will be ever integrated into official TC release because it is not required for normal TC work, order of INI entries have no impact on TC work. I can only suggest to have such script somewhere and run it when you need to edit wincmd.ini if you really want to see entries sorted alphabetically (I prefer to see more important sections first, e.g. [Configuration]).