List of Topics
Main Page
Never run this line while at a command prompt in the root folder of a drive, or just about anywhere else really:

RMDIR /S /Q . <directoryname>

RMDIR stands for Remove Directory (RMDIR can be shortened to RD)

Even if <directoryname> is a temp folder or any other place with a tree of subdirectories that you want gone, its name will be ignored if you use the command above.

Here was my big blunder, failing to understand how RD works, what it ignores, in this case the folder name I supplied.

Basically I gave RD the go-ahead to destroy as many folders, subfolders and files as XP would allow.  The two killer switches are /S and /Q/S stands for sub, as in delete subdirectories, while /Q is for Quiet, as in don't bother me to confirm deletions.

It was the period (.) that put things in motion.  The period, placed (or should I say misplaced) as it was between the switches and the directory name, caused RD to assume I wanted it to delete all files and folders, starting at the current directory (I was at c:\)

By the time I stopped it, so much had been destroyed that XP was nearly unusable.  I hadn't been so upset in a long time.  It would have taken far too long to restore the files with an undelete utility like Restoration, even if I could have gotten everything back, which I seriously doubt… Moreover, the damage had been done at the command line where the Recycle Bin can't help.  The only consolation was that I'd done a backup of all my docs and most of the settings that mattered.  Still, there was no getting away from what had to be done-- knock down what was left of my broken lego tower and start again.
List of Topics
Main Page