News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

removing directories

Started by LouisStDubois, July 19, 2006, 11:45:03 PM

Previous topic - Next topic

LouisStDubois

We're trying to do some custodial work on our hard drive, and have files labelled (.) and (..) that will not respond to erase or delete so that the directory can be removed.  Can anyone advise us as to how to remove such files, so that the directory can be emptied for removal?

MichaelW

The "." and ".." directory entries are not files, but special director names. The "." specifies the directory itself, and the ".." specifies the parent directory. The entries should be present in every directory other than a root directory, and they should not prevent you from removing the directory. If you are working from the command line and the OS is reporting that the directory is not empty, and these are the only entries visible, then it's probably because the directory contains one or more hidden or system files that do not show in a normal directory listing. Depending on your OS version, you may be able to force DIR to show hidden and system files by adding the /A switch, without specifying any attributes:

DIR /A

If necessary, you should be able to clear the hidden and system attributes with ATTRIB:

ATTRIB -S -H  [drive:][path]filename

But note that files with a hidden or system attribute are frequently essential files that have these attributes to protect them from deletion.
eschew obfuscation