DW1 Posted June 13, 2013 Share Posted June 13, 2013 oldest/latest, ascending/descending. Two ways to say the same thing, no? #include <Constants.au3> #include <Array.au3> $sSFK = @ScriptDir & '\sfk.exe' $sDir = 'C:\Scripts' ;try each of these below $sCommand = 'list -late -notime' ;~ $sCommand = 'list -old -notime' Local $hRun = Run(@ComSpec & ' /c "' & $sSFK & '" ' & $sCommand & ' ' & $sDir, @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sOut = '' ClipPut('"' & $sSFK & '" ' & $sCommand & ' "' & $sDir & '"') While 1 $sOut &= StdoutRead($hRun) If @error Then ExitLoop WEnd $sOut = StringReplace($sOut, @CRLF, '', -1) Local $aRet = StringSplit($sOut,@CRLF, 1) _ArrayDisplay($aRet) AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Solution JohnQSmith Posted June 13, 2013 Solution Share Posted June 13, 2013 (edited) C:\> sfk sort sfk ... +sort sort text lines, case insensitive by default. requires a previous command producing text output. options -case case sensitive text comparison -rev[erse] reverse sorting order examples sfk filter csv.txt +sort print sorted contents of csv.txt sfk filter csv.txt +sort +view shows output with the dview GUI tool So change the command to... sfk list -flattime . +sort -rev Also look at... sfk dumphelp Edited June 13, 2013 by JohnQSmith michaelslamet 1 Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
michaelslamet Posted June 14, 2013 Author Share Posted June 14, 2013 Danwilli, JohnQSmith, thanks! The correct syntax for this is from JohnQSmith, it's -rev. Thanks again! Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2013 Share Posted June 14, 2013 Disadvantage of SFK solution is that you must distribute sfk.exe along with your EXE file. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
michaelslamet Posted June 14, 2013 Author Share Posted June 14, 2013 Hi Zedna, Yes, I noticed that Thanks! Link to comment Share on other sites More sharing options...
mike2003 Posted October 4, 2021 Share Posted October 4, 2021 (edited) I am trying to repeat the code with DIR by Spiff59. But I have a problem with Russian characters (row 3). Can this be solved? I assume there is an encoding problem here. Need WIN 1251, but using old DOS 866 (maybe). Edited October 4, 2021 by mike2003 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