RMDIR Statement Details Syntax RMDIR pathspec The pathspec is the name of the directory which is to be deleted. The pathspec must be a string of less than 128 characters. The directory to be removed must be empty except for the working directory ('.') and the parent directory ('..'); otherwise, one of two error messages is printed, either "Path not found" or "Path/File access error." RMDIR works like the DOS command of the same name. However, the syntax in BASIC cannot be shortened to RD, as in DOS.