mschol Posted February 24, 2011 Share Posted February 24, 2011 (edited) i want to call a program with a few parameters and time the total execution time:#include <Timers.au3> $file = FileOpen("time.txt",2) MsgBox(0,'','g:\filelist.exe /MD5 /SHA256 H:\ /S >> fileList_H_'&@MDAY&'-'&@MON&'-'&@HOUR&@MIN&'.csv'); $starttime = _Timer_Init() RunWait('g:\filelist.exe /MD5 /SHA256 H:\ /S fileList_H_'&@MDAY&'-'&@MON&'-'&@HOUR&@MIN&'.csv') FileWriteLine($file,_Timer_Diff($starttime)) FileClose($file) Exitfilelist.exe is a freeware util from JAM software readmein the above code i will always get the output on screen..the /S parameter is undocumented but does workif i execute the command in a command line interface the output gets redirected to the specified file, but i cannot seem to get autoit to do the same...anyone who can help me? Edited February 24, 2011 by mschol Link to comment Share on other sites More sharing options...
Developers Jos Posted February 24, 2011 Developers Share Posted February 24, 2011 Try using @COMSPEC to shell the program or ShellExecute() ? something like (untested) RunWait(@comspec & '/c g:\filelist.exe /MD5 /SHA256 H:\ /S fileList_H_'&@MDAY&'-'&@MON&'-'&@HOUR&@MIN&'.csv') SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mschol Posted February 25, 2011 Author Share Posted February 25, 2011 Try using @COMSPEC to shell the program or ShellExecute() ? something like (untested) RunWait(@comspec & '/c g:\filelist.exe /MD5 /SHA256 H:\ /S fileList_H_'&@MDAY&'-'&@MON&'-'&@HOUR&@MIN&'.csv') that worked, i missed a > before the filename but that was everything thanks 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