buzz44 1 Posted April 27, 2005 (edited) I think maybe the _RunDos() Functions needs a little bit more information, instead of just the example. Maybe this to start.Return Value:Success - Returns the exit code of the commandFailure - Depends on RunErrorsFatal settingRemarks: When piping DOS (console) commands, to a file, you must use the 8.3 short path+name(Shortname) as the destination.Related: Run, RunAsSetExamples:; Ex. #1: #include <Process.au3> $rc = _RunDos("start Http://www.autoitscript.com") ; Ex. #2: #include <Process.au3> $rc = _RunDos("dir > " & FileGetShortName(@ScriptDir) & "temp.txt") ;Pipes the 'dir' command to "temp.txt", located in the running script directoryEdit: Then again maybe it should be up to the user to know they need to use the shortname, and then the above information could/should/might be included in the remarks for Run() as it does comment on how to run DOS commands. Edited April 27, 2005 by Burrup qq Share this post Link to post Share on other sites
CyberSlug 6 Posted April 27, 2005 You don't technically need the short name. You just need to make sure that any paths containing spaces are enclosed in quotes. ; Ugly, but should work: _RunDos('dir > "' & FileGetShortName(@ScriptDir) & '\temp.txt"') Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Share this post Link to post Share on other sites
buzz44 1 Posted April 27, 2005 _RunDos("dir > " & FileGetShortName(@ScriptDir) & "temp.txt");mine _RunDos('dir > "' & FileGetShortName(@ScriptDir) & '\temp.txt"');yours Both work. qq Share this post Link to post Share on other sites
MHz 80 Posted April 27, 2005 I think maybe the _RunDos() Functions needs a little bit more information, instead of just the example. Maybe this to start.Remarks: When piping DOS (console) commands, to a file, you must use the 8.3 short path+name(Shortname) as the destination.$rc = _RunDos("dir > " & FileGetShortName(@ScriptDir) & "temp.txt") ;Pipes the 'dir' command to "temp.txt", located in the running script directory> Redirects output.| Pipes input to output. Share this post Link to post Share on other sites