Dawn,

Thanks. I agree with your assessment. I have never had it fail either.
That's why this seemed so strange.
However, Razzak's second idea worked like a champ!

Thanks

Jan
 


-----Original Message-----
From: [EMAIL PROTECTED]
To: [email protected] (RBASE-L Mailing List)
Date: Wed, 11 Jun 2008 15:27:57 -0400
Subject: [RBASE-L] - Re: CHKFILE


Jan, 

I'm really not sure if that's possible (for the chkfile function to find 
something outside the current directory - unless you specify the full path). 


Use (CVAL('CURRDIR')) to make sure you're in the directory you think you are 
at the time you're calling the function. 

If you have a FILE named backup, as Karen mentioned, it'll return 1 also. 
Using Windows Explorer, if you try to create a folder named backup in your 
"current" directory, and you already have a file named backup, you'll get an 
error too. 

I've never had chkfile NOT work..... 

Dawn Hast



"jan johansen" <[EMAIL PROTECTED]> wrote on 06/11/2008 03:12:05 PM:

> Razzak, 
>   
> Thanks but same results. There is a directory called BACKUP but not 
> in the current directory. 
> It's like maybe there is something in the path that makes the 
> CHKFILE look globally. 
>   
> Jan
>   
> 
> -----Original Message-----
> From: "A. Razzak Memon" <[EMAIL PROTECTED]>
> To: [email protected] (RBASE-L Mailing List)
> Date: Wed, 11 Jun 2008 13:53:00 -0400
> Subject: [RBASE-L] - Re: CHKFILE

> At 01:43 PM 6/11/2008, jan johansen wrote:
> 
> >I know I have done this before but I'm missing something.
> >
> >I'm trying to check the existance of a folder in the current
> >directory named BACKUP and create it if not found so I have
> >SET VAR vChkDir = (CHKFILE("BACKUP"))
> >IF vChkDir <> 1 THEN
> >    MD BACKUP
> >ENDIF
> 
> Jan,
> 
> Here's the correct technique to verify and then create a
> folder, if necessary.
> 
> Example 01:
> 
> -- start here ...
> SET VAR vChkFile INTEGER = NULL
> SET VAR vChkFile = (CHKFILE('PDF'))
> IF vChkFile <> 1 THEN
>     MD PDF
> ENDIF
> -- end here ...
> 
> Change the code as you see fit, including the correct use
> of quotes, in your case.
> 
> Very Best R:egards,
> 
> Razzak.
> 

Reply via email to