The script idea was inspired from the macros for smart sorting INI and REG files posted by Mofi at the IDM user-to-user forum.
Script features
Modification Date: 19/01/2013
Improvements suggested by Mofi:
- Getting document encoding information via a native UE property in supported versions.
- Detection of NT4/NT5 registry files as well as registry files without a heading.
- Fix issue a blank line could be missing after sort, if the last line of registry file is not blank.
- Updated readme file.
Changes by me:
- Escaping UE special characters to fix error in UltraEdit.activeDocument.write.
- Minor enhancements to the existing regular expressions.
- Other minor changes to some lines of code.
Note: Users with older versions of UE/UES can still use the macro posted by Mofi which is compatible with all versions of UltraEdit/UEStudio.
Note: There is another related script RegDelEmptyParentKeys that serves to clean up a registry file from the redundant empty keys after sorting, see RegDelEmptyParentKeys - Clean up a Windows registry file from redundant empty keys.
It may be useful together with the RegIniFileSort script for example when you want to compare two registry files side by side.
Script features
- Smart sorting of *.reg and *.ini and similar files
- sorting of ini section headers and registry keys
- sorting of items of each ini section and registry key
- special sorting of UltraEdit/UES INI file. ('Scripting' and 'Tools' sections)
- sorting of similar files like *.prj and *.pui
- Shuffle feature
- Ultra-fast algorithms for sort and shuffle
- This script requires at least UltraEdit v13.10 or UEStudio v06.30.
- If you plan to sort a large file with many thousands of lines, please use the script with UltraEdit v14.20.0 or UES v09.00.0 or later.
Modification Date: 19/01/2013
Improvements suggested by Mofi:
- Getting document encoding information via a native UE property in supported versions.
- Detection of NT4/NT5 registry files as well as registry files without a heading.
- Fix issue a blank line could be missing after sort, if the last line of registry file is not blank.
- Updated readme file.
Changes by me:
- Escaping UE special characters to fix error in UltraEdit.activeDocument.write.
- Minor enhancements to the existing regular expressions.
- Other minor changes to some lines of code.
Note: Users with older versions of UE/UES can still use the macro posted by Mofi which is compatible with all versions of UltraEdit/UEStudio.
Note: There is another related script RegDelEmptyParentKeys that serves to clean up a registry file from the redundant empty keys after sorting, see RegDelEmptyParentKeys - Clean up a Windows registry file from redundant empty keys.
It may be useful together with the RegIniFileSort script for example when you want to compare two registry files side by side.
- RegIniFileSort.zip (5.48 KiB) 370
- enhanced script, version 3
Including Mofi's suggestions