i just checked out your tip, and just to warn people /s will take your entire system, the /o requires another flag in order to sort in a certain way -- the easiest way to do this would be cmd.exe /c "dir >dir.txt"