Run DOS Commands in Pdox 4.5 DOS

Run DOS Commands in Pdox 4.5 DOS

Post by Ed » Wed, 16 Mar 2005 16:26:13


Is there a way to use DOS commands in a script to make directories, copy
files and the like without having to run a ".bat" or ".exe" file. The
Borland books I have say one can do it, but give no good samples of the
syntax.

I tried the following on my Win XP system on which Paradox for DOS works
fine:
RUN "MD C:\TIMEPROG\BACKUP"
It tries to do something, then kicks me out of paradox, but no directory was
made.

I would appreciate any direction I can get, here. My client is a large
governmental organization, and the only DOS application allowed to run on
its networked work stations is my application. Getting a new DOS application
vetted will take a lot of effort, and I just want to do a few simple things
through my scripts that only dos can do.
Thanks,
Edmund Aleks
XXXX@XXXXX.COM
.
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Wed, 16 Mar 2005 20:41:43


first.. make sure you're running pdoxdos correctly.. download 4xGuide and
Switches from my web site Downloads page..

second.. subscribe to the Pnews server (see my Links page) and search the Dos
section.. there is plenty of information there about wrapping the RUN command in
a process that uses XP's CMD prompt, instead of a Dos Command prompt..

and other stuff you need to know about XP..


Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------

 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Wed, 16 Mar 2005 21:43:53


and you *really* need to re-think that theory.. support for old DOS stuff is
getting harder to find, with each passing day.. when it comes to PdoxDOS, there
are only a handful of top-notch minds left on the entire planet..

what happens to your client if you get hit by a bus?.. if you don't have a
replacement strategy in place, and underway, you are foolish.. and your client
is *more* foolish than you are..


Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Michael Ke » Wed, 16 Mar 2005 22:15:22

Ed,

I've tried to summarise all that stuff in the "Old-Apps" pages at
www.KennedySoftware.ie. And there's a "wrapper" script there also that you
can play with, and improve, and share with us!!! The "knowledge" (ha!) there
is based on very many discussions here on the NGs, and on many hours of
frustra... sorry, programming and testing...

- Mike
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Ed » Thu, 17 Mar 2005 01:57:43

Whew. But as always, thanks, Steve. It's always been helpful, and
interesting, on the infrequent occasions I have written this group for a bit
of direction.

But once more, I'm just a guy who developed (as a hobby) one "lightweight"
app 15 years ago, and who was lucky enough to meet a small need that nobody
else had addressed. I guess I make a pretty good living, but it's certaintly
not off software. My client still uses this app because it speeds things up
for those departments which choose to use it. My client has also decided
that it isn't worth paying someone else to write a more modern app. Me, I
think it should. So, if I'm run over by a bus, my client will start doing
that particular job the way the rest of the government does in that
jurisdiction - by hand.

I'm curious. Other than you, of course, who are the other "top-notch minds
left on the entire planet?"

Ed Aleks
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Thu, 17 Mar 2005 02:22:04


at the risk of leaving somebody out because I forgot them, not because I don't
think highly of them, I won't answer that..


Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Ed Covne » Thu, 17 Mar 2005 03:22:14

> Is there a way to use DOS commands in a script to make directories, copy

In PDX for Windows, I'd use:

strcmd = "cmd /c MD C:\TIMEPROG\BACKUP"
execute(strcmd, Yes, ExeHidden)

Does RUN "cmd /c MD C:\TIMEPROG\BACKUP" work?


Ed
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Thu, 17 Mar 2005 03:28:23


actually, it's RUN NOSHELL for that.. plus, we take the actual command line,
slam it into a batch file, and RUN NOSHELL "cmd /c " + the batch file.. because
there are some things that only work *that* way..

but you've got the basic idea..

Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Ed » Fri, 18 Mar 2005 12:28:45

Let me once more thank the members of this group, especially Steve Green and
Michael Kennedy for being here for guys like me, and helping us solve those
mysteries that always seem to gravitate to the uneducated. I was referred to
some great material, and actually read some while trying things along the
way.

Once I got the syntax down ("RUN "CMD.EXE/C MONDAY.BAT") I learned I would
have to manage memory better to get some DOS commands like "XCOPY," to work.
The way I got it was to write in a "Release All Procs" command in my script
just before I ran memory hungry BAT files. Also, because all the computers
using my program have 512mb of Ram, I increased the "-extk" command line
from
16000 to 24000. I Don't know if the latter will help, as Steve Green's
instructions on the various command lines available to Paradox Dos indicate
that performance gains tend to fade after 16000. However, these machines
have plenty of memory, so I figured what can it hurt?

I know this is not an elegant solution, and that there are surely much
better ones, but my problem appears to be solved and my education has been
enhanced.

Thanks again,
Ed Aleks
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Fri, 18 Mar 2005 20:30:04


you don't have it yet.. it's RUN NOSHELL.. very important difference.. right
now, you're opening a command shell, to open a cmd shell.. that's part of your
problem..



that, in itself, usually creates problems.. not a good idea..



the max is 16000.. and on an NT-class machine, you only get about 11 meg, no
matter what you do..


Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Ed » Sat, 19 Mar 2005 03:09:07

OK, thanks, Steve. I added NOSHELL. I had missed your comment in a previous
post to another person...

I had previously learned the (very) hard way about the Release All Procs
command, but it does free up some memory in a hurry, and this time it only
occurs after the user has made an irrevocable decision to quit the program.
The third line from the end is the RELEASE ALL PROCS command. The next line
is the RUN NOSHELL command. Then , the EXIT command. Wouldn't this mitigate
potential problems?

Ed Aleks
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Michael Ke » Sat, 19 Mar 2005 06:54:22

Ed,


Just wondering if, instead, you could just:
- Set some "flag" (eg, "ECHO Something >FlagFile" from inside Paradox (and
requires trivial memory)
- EXIT
- Do the main work in the main BAT file (that ran Paradox), after Paradox
has closed down. Picking up the relevant "Flags" - as needed...

Mike
 
 
 

Run DOS Commands in Pdox 4.5 DOS

Post by Steven Gre » Sat, 19 Mar 2005 07:59:16


correct.. if you're on the way out of dodge anyhow, it doesn't matter.. but in
any other ongoing use thru an app, it would be a poor way to deal with it..


Diamond Software Group
http://www.yqcomputer.com/
Paradox Support & Sales - Corel CTech Paradox
---------------------------------------------------
Diamond Sports Gems
http://www.yqcomputer.com/
Trading Cards and other Sports Memorabilia
---------------------------------------------------