Here are the code pieces for the auto-filing of VTX .TXT files. This type code can be adapted anywhere for similar systems... Files in order are: MAKEVTXDIR.SCP SETDEFVTX.SCP SETDEFOA.SCP FILE_VTX.SCP the named data entry for VTX should read something like this: ;;VTX;; DO MAKEVTXDIR\DOSETDEFVTX\DO VTX\DO SETDEFOA\DO FILE_VTX Files follow separated by formfeeds - copyrights have been added already for you ! makevtxdir.scp - creates a vtx subdir if not already there ! assumes that the user is currently in oauser: directory. ! once the .VTX directory has been made, set a permanent symbol ! to flag its existance, so that none of this gets executed again. ! ! written 1-19-87 A.D. Hull - DEC ! ! check for symbol value first ! get #vtxdir = $vtxdir .if #vtxdir eqs "EXISTS" then .goto exit_point ! get oa$dcl = "$ create/directory [.vtx]" get $vtxdir = 'EXISTS' .label exit_point .exit ! setdefvtx script - force default directory to [.A1.VTX] ! written by A.D. Hull 1-19-87 ! must only be called when user is in OAUSER: directory as current default ! DISPLAY Setting default to [.VTX] directory\force get #defdir = '[.vtx]' get oa$function = 'set_def ' #defdir .exit ! setdefoa script - force default directory to return to OAUSER: ! written by A.D. Hull 1-19-87 get #defdir = 'oauser:' get oa$function = 'set_def ' #defdir .exit ! FILE_VTX.SCP - written by Alan D. Hull - DEC - 19-Jan-87 ! ! this script is invoked on exiting VTX (invoked from ALL-IN-1) ! and checks for the ! existance of any .TXT print files generated from inside VTX. The user ! must specifically name the print file ".TXT" file type for this script to find ! it and file it in the filecabinet, using the WPSPLUS DSAB datatype. ! This script can only be run with OAUSER: as the current default directory, ! since it looks for a subdirectory. .LABEL START GET #FOLDER = "VIDEOTEX PRINTFILES" GET #TARGET = OA$DIR:"[.VTX]*.*;*".%WHOLE["*.TXT"] .LABEL LOOP .IF #TARGET EQS "" THEN .GOTO EXIT GET #TITLE = OA$DIR:"[.VTX]*.*;*".NAME[#TARGET] CAB CREATE #FOLDER,,#NEW_CABFILE GET #OUTFILE = CAB$.FILENAME[#NEW_CABFILE] CAB BEGIN CAB ADD_ATTRIBUTE #NEW_CABFILE,"TITLE",#TITLE CAB ADD_ATTRIBUTE #NEW_CABFILE,"TYPE","DOCUMENT" CAB ADD_ATTRIBUTE #NEW_CABFILE,"DSAB","WPSPLUS" CAB END COPY #TARGET #OUTFILE .LABEL CHECK_STATUS .IF OA$STATUS NE 1 THEN .GOTO ERROR GET OA$DISPLAY = #TITLE " filed in " #FOLDER " folder. . ." FORCE GET #DELETE_FILE = #TARGET .LABEL NEXT GET #TARGET = OA$DIR:"[.VTX]*.TXT;*".%NEXT[#TARGET] GET OA$FUNCTION = "DELETE_FILE " #DELETE_FILE .GOTO LOOP .LABEL ERROR GET OA$DISPLAY = "Error occurred on file " #TARGET FORCE .LABEL EXIT .EXIT