YunusEmre Posted September 1, 2014 Share Posted September 1, 2014 Run(@ComSpec & " /c " & "dir /b > file_names.txt", "", @SW_HIDE) I want utf-8 Link to comment Share on other sites More sharing options...
smartee Posted September 1, 2014 Share Posted September 1, 2014 Does this work?#include <File.au3> $aFileList = _FileListToArray(@ScriptDir) ; requires #include <File.au3> $hFile = FileOpen(@ScriptDir & "\myfiles.txt", $FO_UTF8_NOBOM + $FO_OVERWRITE) For $i = 1 To $aFileList[0] FileWriteLine($hFile, $aFileList[$i]) Next FileClose($hFile) YunusEmre 1 Link to comment Share on other sites More sharing options...
MHz Posted September 1, 2014 Share Posted September 1, 2014 Open a CMD prompt Type CMD /? Look for parameter of /U The description of /U is: Causes the output of internal commands to a pipe or file to be Unicode So use the below code. Run('"' & @ComSpec & '" /u /c dir /b > file_names.txt', '', @SW_HIDE) Tested with ççūūşş.txt. With /U returned ççūūşş.txt. Without /U returned ‡‡uuss.txt. YunusEmre 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now