Navigation: Templates > Template Language Reference > Complete Alpha Listing >====== #REMOVE (delete a source file) ====== | |
#REMOVE( file )
#REMOVE | Deletes a source output file. |
file | A string constant, template symbol, or expression containing a DOS file specification. This may be a fully qualified DOS pathname. |
The #REMOVE statement deletes the specified source output file. If the file does not exist, #REMOVE is ignored and source generation continues.
Example:
#FOR(%Module)
#SET(%TempModuleFile,(%Module & '.$$$')) #!Set temp module file
#CREATE(%TempModuleFile) #!Create temp module file
#FOR(%ModuleProcedure) #!For all procs in module
#FIX(%Procedure,%ModuleProcedure) #!Fix current procedure
#GENERATE(%Procedure) #!Generate procedure code
#ENDFOR #!EndFor all procs in module
#SET(%ModuleFile,(%Module & '.CLW')) #!Set to current module file
#CREATE(%ModuleFile) #!Create module file
#GENERATE(%Module) #!Generate module header
#APPEND(%TempModuleFile) #!Add generated procedures
#REMOVE(%TempModuleFile) #!Delete the temporary file
#ENDFOR