Hi Clamicun,
It's the UTF8 BOM that ensures that Notepad & friends can read the text properly.
GetFiles *.txt returns the Files$() array in UTF-8 format, so that it can be used everywhere in the World ;)
If you don't want to use this feature, put GfNoUtf8=1 before
Store (yep, this is an undocumented switch, sorry :icon_redface:):
include \masm32\MasmBasic\MasmBasic.inc ; download
Init
GetFiles *.as?|*.rc
SortFiles ; recent files on top
GfNoUtf8=1
Store "Asm_rc_Plain.txt", Files$()
EndOfCodeI attach a full example, including a file with a name that will not show up in some editors with GfNoUtf8=1. You can see the difference (at least on Win7-64) with these two lines used at the bottom of the attached example:
Launch ExpandEnv$("%ProgramFiles%\Windows NT\Accessories\wordpad.exe Asm_rc_Utf8.txt")
Launch ExpandEnv$("%ProgramFiles%\Windows NT\Accessories\wordpad.exe Asm_rc_Plain.txt")
Note that in contrast to Wordpad and browsers, Notepad.exe apparently has some autodetect mechanism, it displays the filename correctly for both versions.
P.S.: You certainly don't step on my nerves, this is very useful feedback :icon14: