Sign in to follow this  
Followers 0
mschol

runwait not behavioring as expected

3 posts in this topic

#1 ·  Posted (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)

Exit

filelist.exe is a freeware util from JAM software readme

in the above code i will always get the output on screen..

the /S parameter is undocumented but does work

if 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 by mschol

Share this post


Link to post
Share on other sites



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')

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0