Compile a folder

jmac13

Member
(I'm using open edge 10.2b)

If I want compile a whole folder e.g. c:\cdms\system how do i do it within code? I know I can compile everything in c:\cdms\system and all the subfolders using application compiler. but I'm trying to write a script to automate this and I wonder if there is a way of doing this

Thanks
 
1. INPUT from the source directory
2. filter for files / dirctories using, filter for .w / .p files ( you could perhaps build a TEMP-TABLE to hold the file & its directory name)
3. COMIPILE the files and SAVE the rcode to different rcode dir
 
Hi Rzr,

Thanks for the reply but Not sure I follow you.

whats the syntaxt to do a compile *.w? I want to do Compile c:\cdms\system *.w save.
 
Hi Rzr,

whats the syntaxt to do a compile *.w? I want to do Compile c:\cdms\system *.w save.

You cannot. You need to get the contents of the directory using INPUT and OS-DIR and compile each file separately.

Code:
DEF VAR cbase     AS CHAR NO-UNDO.
DEF VAR cabsolute AS CHAR NO-UNDO.
DEF VAR cattr     AS CHAR NO-UNDO.


INPUT FROM OS-DIR ( "c:/temp" ).


REPEAT:


   IMPORT cbase cabsolute cattr.


   IF INDEX( cattr, "F" ) > 0 AND 
      cbase MATCHES "*~~.w" 
   THEN
      COMPILE VALUE( cabsolute ) SAVE.


END.


INPUT CLOSE.
 
Back
Top