RmDirpath
The RmDir() function deletes a folder (directory), specified by the path argument. The argument can't contain wildcard characters (in other words, you can't remove multiple folders with a single call to the RmDir() function). Moreover, the folder must be empty; if not, a runtime error will occur. To remove a folder containing files, use the Kill() function to delete the files first. In addition, you must remove all subfolders of a given folder before you can remove the parent folder. The statement:
RmDir("C:\Users")
will generate an error message. You must first remove the subfolder, then the parent folder:
RmDir("C:\Users\New User") RmDir("C:\Users")
Post a comment