SpartaDOS X Reference Manual

The Command Processor — Commands




RMDIR (Remove Directory) Command

Index


Purpose

This command deletes an empty subdirectory from the specified drive.
 

Syntax RMDIR [d:]path
 
Alias RD & DELDIR
 
Type Internal
 
Related CHDIR, MKDIR, PATH
 
Remarks The directory must be empty before it can be removed. The last directory name in the path is the directory to be removed. This function is not supported by the ATARIDOS.SYS driver even though subdirectories are supported by that driver.

    RD TEST
    DELDIR 3:>MODEM>TEST

The first example removes a subdirectory on the default drive by the name of "TEST". An error will occur if the directory has files in it. The second example removes a subdirectory on drive D3: by the name of "TEST" in the subdirectory called MODEM which is under the MAIN directory.

For related information see the CHDIR, MKDIR, and PATH commands.

Note: If a file has been opened for write or update but not properly closed (usually by hitting reset or losing power while it is opened) its entry in the directory will not be removed, although it may not show in a listing. A subdirectory containing a "phantom" entry of this type can not be deleted. CLEANUP or DISKRX from the SpartaDOS Tool Kit can be used to mark such an entry as deleted and not open so that the directory may be removed. The status byte of the directory entry will have bit 7 and bit 3 set. These should be cleared and bit 4 set. It is possible that some sectors have been allocated for this file. These should be de-allocated in the bit map.


Previous page

Next page