>Hi
>
>Is there a command to delete a Directory also if it is not empty?
>
>Tank you in advance for the help.
>Luigi
You can use Scripting for this, something like:
Function DeleteFolder(tcFolder, tlForce)
LOCAL loFSO, llSuccess
llSuccess = .F.
IF VARTYPE(tcFolder) = 'C' AND DIRECTORY(tcFolder)
TRY
loFSO = CREATEOBJECT('Scripting.FileSystemObject')
loFSO.DeleteFolder(tcFolder, tlForce)
llSuccess = .T.
CATCH
ENDTRY
ENDIF
RETURN llSuccess
The Force parameter is to force the deletion of any R/O file
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges