RMDIRSYSTEM StatementWindows/Unix

A statement that removes a directory.

Syntax: RMDIR directory
RMDIR "abc"
RMDIR "LastCopy\123"  for sub..subdirectory in the current directory.
RMDIR  "C:\W98\"         for full path

1) You should remove all files from the folder.
2) Be sure to use the full file spec (e.g., RMDIR "C:\tempFolder\subfolder")
3) Make sure the directory is not the current working directory. Do a CHDIR if needed before RMDIR
4) Also some QOBJECTs  like QFileListBox and QFileStream will take access to a folder,
making it so you can't delete the folder and possibly some of the files. Set QFILELIST.Directory to some other directory and .Update before deleting.
5) Don't use string variables with $DEFINE, use an actual string variable.