Groups > dBase > dBase programming > Re: Using RUN to create/copy zip files




Using RUN to create/copy zip files

Using RUN to create/copy zip files
Fri, 04 Apr 2008 00:43:34 -050
I run an exe that zips up some files with 

RUN(true,cRunProgram).  

The program is FBzip.exe.  

When it is completed, I must programmatically copy the files.  However, the run
usually takes some time to finish the zip file.  But windows continues to
execute the code to do the copy before the file is complete.

I tried placing a do while to check for the file before startng the copy, like
so:

DO WHILE empty(FILE(cFileNameP))  
ENDDO

but FBzip creates a file and then populates it so the do while sees a file, even
tho it is not completed. Then the copy runs, copying an incomplete file.

Anyone have a suggestion on how I can prevent the copy code from running until
the zip file is fully completed?  

Thanks for any ideas on this,
Mark

Post Reply
Re: Using RUN to create/copy zip files
Fri, 04 Apr 2008 01:10:46 -050
Just a note.  For example, is there a way for me to detect if FBzip.exe is still
running, which would tell me it is still constructing the zip file.  Then I
could start the copy once FBzip is no longer running.

Thanks again,
Mark

Mark Wrote:

> I run an exe that zips up some files with 
> 
> RUN(true,cRunProgram).  
> 
> The program is FBzip.exe.  
> 
> When it is completed, I must programmatically copy the files.  However, the
run usually takes some time to finish the zip file.  But windows continues to
execute the code to do the copy before the file is complete.
> 
> I tried placing a do while to check for the file before startng the copy,
like so:
> 
> DO WHILE empty(FILE(cFileNameP))  
> ENDDO
> 
> but FBzip creates a file and then populates it so the do while sees a file,
even tho it is not completed. Then the copy runs, copying an incomplete file.
> 
> Anyone have a suggestion on how I can prevent the copy code from running
until the zip file is fully completed?  
> 
> Thanks for any ideas on this,
> Mark
> 
> 
Post Reply
Re: Using RUN to create/copy zip files
Fri, 04 Apr 2008 08:13:29 +020
On Fri, 04 Apr 2008 08:10:46 +0200, Mark <NOSPAM@NOSPAM.com> wrote:

> Just a note.  For example, is there a way for me to detect if FBzip.exe  
> is still running, which would tell me it is still constructing the zip  
> file.  Then I could start the copy once FBzip is no longer running.
>
This may be a silly question but is there any reason why you can't copy  
the files before you zip them?

Post Reply
Re: Using RUN to create/copy zip files
Fri, 4 Apr 2008 10:23:34 +0200
>> Just a note.  For example, is there a way for me to detect if FBzip.exe

>> is still running, which would tell me it is still constructing the zip

>> file.  Then I could start the copy once FBzip is no longer running.
>>
> This may be a silly question but is there any reason why you can't copy 
> the files before you zip them?
>
I guess he wants to copy the zipped files <g>


CU,Marc

Post Reply
Re: Using RUN to create/copy zip files
Fri, 4 Apr 2008 10:26:09 +0200
Hi Mark,

> Anyone have a suggestion on how I can prevent the copy code from running 
> until the zip file is fully completed?

Take a look at runwait.prg in the duflp, it can handle that

CU, Marc 

Post Reply
<< Previous 1 2 3 4 Next >>
( Page 1 of 4 )
about | contact