Re: SHELLing
From: Craig D. Best (cbest_at_info.census.gov)
Date: 05/20/04
- Next message: Dib: "Re: Vb Controls"
- Previous message: Craig D. Best: "Re: SHELLing"
- In reply to: UncleWobbly: "Re: SHELLing"
- Next in thread: UncleWobbly: "Re: SHELLing"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 May 2004 10:42:50 -0500
Thanks, Wobby!
It's a weird solution I used but it seems to work right now. I now call a
batch file which first copies a file to the c:\temp directory and my VB
program waits until the bat file deletes it before preceeding. It's strange
code but it works! I actually have 2 loops back to back.......I shell out
to my batch file, loop until the file exists in c:\temp and then loop until
the file doesn't exist in c:\temp and then continue.
UncleWobbly wrote:
> http://www.vbcode.com/asp/showsn.asp?theID=9026
>
> "Craig D. Best" <cbest@info.census.gov> wrote in message
> news:40AA7DAD.FAA004B0@info.census.gov...
> > I'm writing a backup utility in VB6 where I collect some info from the
> > user using a form and then SHELL out to run a compression program
> > (WZZIP.EXE) to perform the backup based upon the user input. After
> > performing the zip which takes up to 5 minutes, I want to verify the
> > existence of the zip file and report to the user a backup failure if the
> > zip file doesn't exist.
> >
> > The problem I have is that when the program shells, while it's doing
> > it's DOS work, the VB6 program continues to run. Since it doesn't
> > find the file when it checks (it's not created yet), I get an error
> > message that the backup failed. I vaguely recall back in the old
> > BASICA days that execute would halt during child processes.....that's
> > what I need here.
> >
> > Is there a convenient way to pause execution of the program until the
> > SHELL completes processing? I thought about writing a function to
> > open the zip file assuming I couldn't open it while it was locked by the
> > WZZIP. ie Loop until I'm able to open it and then exit the loop but
> > that seems a bit sloppy and unstable.
> >
> > I'd appreciate any feedback or ideas on this problem?
> >
> >
> > --
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Craig Best
> > Supervisory Geographer
> > US Census Bureau
> > Kansas City Regional Office
> > 1211 N 8th St
> > Kansas City, KS 66101
> > (voice) 913-551-6833
> > (fax) 913-551-6780
> > cbest@info.census.gov
> > http://www.census.gov
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Craig Best Supervisory Geographer US Census Bureau Kansas City Regional Office 1211 N 8th St Kansas City, KS 66101 (voice) 913-551-6833 (fax) 913-551-6780 cbest@info.census.gov http://www.census.gov ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Next message: Dib: "Re: Vb Controls"
- Previous message: Craig D. Best: "Re: SHELLing"
- In reply to: UncleWobbly: "Re: SHELLing"
- Next in thread: UncleWobbly: "Re: SHELLing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|