smifffy Posted June 26, 2009 Report Share Posted June 26, 2009 Hi all, First time poster, so go easy I'm trying to get the program parameters option to work. My objective is to output the result of dos window to a file. So in DOS this is what I'd do: C:\Program Files\SyncToy 2.0\SyncToyCmd.exe -R > C:\logfile.log and so in Macro Express I assumed that I'd use the program parameters option and put -R C:\logfile.log in there. Something like this: But it doesn't work? As soon as I put a space in the program parameters field it fails. I also can't see why it fails because the DOS window closes immediately on fail. Any help much appreciated. Quote Link to comment Share on other sites More sharing options...
rberq Posted June 26, 2009 Report Share Posted June 26, 2009 Try including the > (greater than) sign in the program parameters: -R > C:\logfile.log rather than -R C:\logfile.log I don't think it is the space that is causing the problem -- I have a similar program call where I pass two parameters separated by a space, like this: MGM %T82% Quote Link to comment Share on other sites More sharing options...
smifffy Posted June 26, 2009 Author Report Share Posted June 26, 2009 Ahh, yeah, My typo - I've tried the > sign and it doesn't like the 2nd argument? I've tried using "" marks around each of the arguments too, but it doesn't work. Any other help much appreciated.... Quote Link to comment Share on other sites More sharing options...
kevin Posted June 26, 2009 Report Share Posted June 26, 2009 Macro Express is unable to redirect ( > ) or pipe ( | ) output to stdout. To accomplish this you can create a batch (.bat) file and call it from the macro. You batch file should look like this: C:\Program Files\SyncToy 2.0\SyncToyCmd.exe -R > C:\logfile.log and your macro like this: Quote Link to comment Share on other sites More sharing options...
smifffy Posted June 27, 2009 Author Report Share Posted June 27, 2009 Macro Express is unable to redirect ( > ) or pipe ( | ) output to stdout. To accomplish this you can create a batch (.bat) file and call it from the macro. You batch file should look like this: C:\Program Files\SyncToy 2.0\SyncToyCmd.exe -R > C:\logfile.log and your macro like this: Genius. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.