Jump to content
Macro Express Forums

Program Parameters option


smifffy

Recommended Posts

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:

 

me3.jpg

 

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.

Link to comment
Share on other sites

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%

Link to comment
Share on other sites

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:

post-8-1246039123_thumb.jpg

Link to comment
Share on other sites

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:

post-8-1246039123_thumb.jpg

 

Genius. Thanks :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...