Consultor Eletrônico



Kbase P52662: How to delete all the files in a given directory using the 4
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   20/01/2004
Status: Unverified

GOAL:

How to delete all the files in a given directory using the 4GL OS-COMMAND statement?

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 9.x

FIX:

DEFINE VARIABLE cCommand AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDiretory AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.

ASSIGN
cDiretory = "C:\WRK91D\TEMP\"
cFileName = "*.*"
cCommand = "DEL" + CHR(32) + cDiretory + cFileName + CHR(32) + '/Q'.

OS-COMMAND SILENT VALUE(cCommand).