>Hi all:
>
>I am attempting to first, delete an existing directory and all subfolders within that directory and then create a new directory with subdirectories where needed.
>
>I have tried the RMDIR and RD commands - but get a message that says "File Access is Denied". Clicking HELP tells me that I am trying to write to a protected file (whihc is not true).
>
>Any suggestions? Thank you in advance.
Hi Henry.
You cannot RMDIR a directory if it contains files and/or directory.
You must build a recursive function which:
- receives a path
- deletes all files: delete file (cPath+"\*.*")
- gets a list of subdirectories (ADIR)
- for each subdirectory (if any) call self
- finally RMDIR (cPath)
Hope this helps and bye.
Jose.