Thanks Paul and Razzak.  Trailing backslash was issue.  And I like the shorter 
code lines.

Claudine

-----Original Message-----
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
A. Razzak Memon
Sent: Wednesday, April 04, 2018 1:49 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - CHKFILE problem

Claudine,

Without knowing all details about your network, folders, mapped drives, etc ...

Try the following test and see what you get.

-- Example 01
IF (CHKFILE('C:\ScanFolder')) <> 1 THEN
    MD C:\ScanFolder
ENDIF

-- Example 02:
    SET VAR vScanFolder TEXT = 'C:\ScanFolder'
IF (CHKFILE(.vScanFolder)) <> 1 THEN
    MD &vScanFolder
ENDIF

Feel free to recycle and adjust the logic as you see fit.

Very Best R:egards,

Razzak


At 02:26 PM 4/4/2018, Claudine Robbins wrote:

>SET VAR vlscandir = (SRPL((CVAL('CURRDIR')+ '\TRAIL\' ), '\\', '\',0)) 
>SET VAR vsscandir = ('TRAIL\') SET VAR vChkDir INTEGER = NULL SET VAR 
>vChkDir = (CHKFILE(.vLScanDir)) IF vChkDir <> 1 THEN
>   MKDIR &vSScanDir
>ENDIF
>
>R>sho v vlscandir
>C:\IEX_X\TRAIL\
>
>This sequence fails. The directory exists but  vChkDir = 0 whereas it 
>should be 1 and MKDIR command fails with "-ERROR - Unable to Create 
>Directory (2269)"
>
>I cannot see what's wrong here.  I even copied RRBYW19 code.



--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to