buzz44 Posted April 27, 2005 Share 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 Link to comment Share on other sites More sharing options...
CyberSlug Posted April 27, 2005 Share 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! Link to comment Share on other sites More sharing options...
buzz44 Posted April 27, 2005 Author Share Posted April 27, 2005 _RunDos("dir > " & FileGetShortName(@ScriptDir) & "temp.txt");mine _RunDos('dir > "' & FileGetShortName(@ScriptDir) & '\temp.txt"');yours Both work. qq Link to comment Share on other sites More sharing options...
MHz Posted April 27, 2005 Share 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. 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