Posted by Grant Foraker on March 22, 2007 at 10:24:28:
Program that runs monthly, in background, creates PDF files for about 260 HOA's and then moves them to a subfolder in the archive directory on a file share.
Sometimes the clerical people forget to set up the subfolder. So, I do a make directory and trap the error if it already exists.
MPA10:
!--------------------- MAKE SUB DIRECTORY -------------------------
LET DOSFUNCT$ = 'D'
LET DIRECTORY$ = STRIP(PATH$)
IF STRIP(AACODE$) NE ''
LET DIRECTORY$ = DIRECTORY$ + STRIP(AACODE$) + '\'
ELSE
LET DIRECTORY$ = DIRECTORY$ + ASSN$ + '\'
ENDIF
AX$ = "@3900@" ! Set AX to "MAKE DIREC."
CX$ = "@0000@" ! Set CX register to null
DOSFC(AX$,CX$,DIRECTORY$) EXCP = DOSERROR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Doscode$ = "D" + HEXASC(SUB(AX$,2,1))
When I was testing on my development PC, Doscode$ would come out "D03". On the live system I get "DB7".