Source language: Translate to:

Run action command

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Run action command

Postby reinier maliepaard » Sun Jul 29, 2012 10:35 pm


Running the following from the command line works excellent:

Code: Select all
mcm2xml.exe test.mcm > reinier.xml

Explanation: mcm2xml.exe processes the inputfile test.mcm and saves the result into the file reinier.xml (using the redirection operator >) .

However, for some reason, this specific case does not work with the Neobook Run Command:

Code: Select all
Run "mcm2xml.exe" "test.mcm > reinier.xml" "RunOnce+Wait+Hidden" "" ""

To make it work, this trick will do:

Code: Select all
1. FileWrite "tempxml.bat" "All" "mcm2xml.exe test.mcm > reinier.xml"
2. Run "tempxml.bat" "" "RunOnce+Wait+Hidden" "" ""

reinier maliepaard
Posts: 30
Joined: Sat Jan 17, 2009 2:53 pm

Postby dec » Mon Jul 30, 2012 2:46 am


Maybe you can play a little with the arguments. For example, this code work like we can expect:

Code: Select all
SetVar "[LastCurrentDir]" "[CurrentDir]"
SetVar "[CurrentDir]" "[PubDir]"
Run "dir" ">dirout.txt" "Hidden" "" ""
SetVar "[CurrentDir]" "[LastCurrentDir]"

In this case we take care about the current directory to tell to the "dir" command what directory we want to list. Anyway, you can view here how we can use the "> redirector". I supose that if we can use this here, maybe it's possible to use with your particular program "mcm2xml.exe".

In my opinion, it's not a good idea to create and run "BAT" files, since, for example, in some locations we don't have the appropiate privileges to do it. So, in some extreme an particular cases can be a good solution, but, in my honest opinion, we need to try some possible alternatives when available.

Maybe this article can help in some manner.
Enhance your NeoBook applications!
57 plugins, 1113 actions and 230 samples
NeoPlugins website:
User avatar
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 1 guest