Kbase P52680: How to delete all the files in a given directory using the 4
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/6/2003 |
|
Status: Unverified
GOAL:
How to delete all the files in a given directory using the 4GL OS-DELETE statement?
FIX:
DEFINE VARIABLE cDirectoryName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
ASSIGN
cDirectoryName = "C:\WRK91D\Temp"
PROPATH = PROPATH + ';' + cDirectoryName.
INPUT FROM OS-DIR(cDirectoryName).
REPEAT:
IMPORT cFileName.
cFileName = SEARCH(cFilename).
OS-DELETE VALUE(cFileName) NO-ERROR.
END.
INPUT CLOSE.