James Atkin <James.Atkin@Phase.Com> wrote:
> Hi There,
>
> Is there a way to access MD, CD etc without having to run a DOS session for
> each one ?
> I have creatied a function that generates 'x' number of levels of directory
> structure, i.e.
> md c:level1
> md c:level1Level2
> md c:level1Level2Level3
> etc..
>
> Each time a 'md' is executed, a Command Prompt is executed and when finished,
> exited.
> The next stage is then done.
> As you can imagine, this can be quite time consuming on 5 or 6 level
> directories !
>
> Is there any alternative ?
I can think of two:
(1) Write all the commands you need to a file (like a .bat) then
execute that file with one DOS session.
This probably is your best bet.
(2) Use the windows API directly. You'll need to build the header file but
after that you're just executing functions to build the directories
or do lots of other things.
This would be very fast but requires a lot more work and support
becomes an issue since nothing guarantees that the API won't change.
regards
Stan Bischof
----------------------------------------------------------------------
Stan Bischof Hewlett Packard Company 707-577-3994 rsb@sr.hp.com
----------------------------------------------------------------------
> Hi There,
>
> Is there a way to access MD, CD etc without having to run a DOS session for
> each one ?
> I have creatied a function that generates 'x' number of levels of directory
> structure, i.e.
> md c:level1
> md c:level1Level2
> md c:level1Level2Level3
> etc..
>
> Each time a 'md' is executed, a Command Prompt is executed and when finished,
> exited.
> The next stage is then done.
> As you can imagine, this can be quite time consuming on 5 or 6 level
> directories !
>
> Is there any alternative ?
I can think of two:
(1) Write all the commands you need to a file (like a .bat) then
execute that file with one DOS session.
This probably is your best bet.
(2) Use the windows API directly. You'll need to build the header file but
after that you're just executing functions to build the directories
or do lots of other things.
This would be very fast but requires a lot more work and support
becomes an issue since nothing guarantees that the API won't change.
regards
Stan Bischof
----------------------------------------------------------------------
Stan Bischof Hewlett Packard Company 707-577-3994 rsb@sr.hp.com
----------------------------------------------------------------------
James,
One alternative would be to use the to file object to create a batch file that
has all of the DOS based commands you want to execute, then use the execute
program to run that batch file. This way only one command prompt is generated
and the file could be deleted/used again at a later time.
Thanks,
Lyle Carnahan
Hewlett-Packard
lyle_carnahan@hp.com
______________________________ Reply Separator _________________________________
Subject: VRF - Accessing DOS MD, CD etc...
Author: Non-HP-James.Atkin (James.Atkin@Phase.Com) at HP-USA,mimegw5
Date: 4/30/98 10:10 AM
Hi There,
Is there a way to access MD, CD etc without having to run a DOS session for each
one ?
I have creatied a function that generates 'x' number of levels of directory stru
cture, i.e.
md c:level1
md c:level1Level2
md c:level1Level2Level3
etc..
Each time a 'md' is executed, a Command Prompt is executed and when finished, ex
ited.
The next stage is then done.
As you can imagine, this can be quite time consuming on 5 or 6 level directories
!
Is there any alternative ?
Thanks,
James
(James.Atkin@Phase.Com)
!
!
!
!