PDA

View Full Version : Batch File help



shard01
November 24th, 2009, 12:15 PM
Monarch Pro 5.02
Windows XP

Basically I'm trying to setup a batch file to open a project and export the table view to add to a database overwriting the existing table.

I can get the batch file to open the project or monarch but it doesn't recognise any commands (/exp, /exptable, or even /rpt /prj) I've tried using the BAT tool I found through the forums but no luck.

So here are my two different attempts so far.

Using Just the Project


@echo off
"C:\Location\Unknowns.prj" /exp:"C:\Location\Unknowns.mdb" /expfileopt:add /exptable:"Unknown"

Will open the project (Report, Model, in table view) correctly but does not export.


Using the Excel BAT creator


"C:\Program Files\Monarch\Program\Monarch.exe" /rpt:"C:\Location\Report.rpt" /prj:"C:\Location\Unknowns.prj" /mod:"C:\Location\Unknowns.mod" /T /exp:"C:\Location\Unknowns.mdb" /expfileopt:add /exptable:"Unknown"

Just open's Monarh.


Any help would be appreciated.

Data Kruncher
November 24th, 2009, 12:42 PM
I suspect that you need to add the /exptableopt: parameter. With it you'll need one of:

overwrite
append
skip
I'll have to look at the Excel program later on.

Kruncher

Data Kruncher
November 24th, 2009, 12:47 PM
Actually, hold that thought. I just noticed that you're using Monarch v5.02.

The parameters /exptable:, /exptableopt: and /expfiltopt: only take effect with Monarch v8 and later.

If you really need to take advantage of these tools regularly to work as efficiently as possible, and I'd highly recommend that you do (and you clearly intend to do so), then it sounds like it's upgrade time for you. :)

shard01
November 24th, 2009, 03:13 PM
Haha... Yeah it is beyond time to upgrade but its not up to me.
I do have a machine with v8.02 that I could use. The only issue is only a few of us have access to that machine, but it could be done still. Lets say I go that route...

So I would need to use xprj projects? And what syntax would I have to change then.

Thanks for the quick replies!

Data Kruncher
November 24th, 2009, 03:25 PM
No, the syntax would not change.

You don't have to use .xprj instead of .prj, but if you make any changes to the project or the model then you must save them as .xmod and .xprj and revise the batch file.