Loading


Add to Google

Monday, September 5, 2011

Computer 101: The DEL and the DELTREE DOS Command

Back in the early days of the DOS or Disk Operating System as the main operating system (OS) there is this two very useful command for erasing files and for erasing entire directory and its sub directories. They are the DEL for delete and the DELTREE for deleting the structure of the directories and all the files contains in it. They are both used to erase or delete items on your hard drive. The DEL command is very easy to use, we just type the command DEL and then press the space and then type the name of the file that we want to erase and press the enter key to execute the command. Presto we just deleted the name of the files indicated opposite the DEL command. But just like all DOS command if the name of the file does not match with the one we type there it will display an error like this " FILE NOT FOUND". To avoid this we have to make sure that every character of the file name that we need to delete must match the actual file name that we type after the DEL command.


DEL command option


The DEL command was used for deleting files or group of files in a single folder or directories. How about if one should delete entire directories and all it's sub directories, is the DEL command still applicable? Well yes it is still applicable but it would take to long do the process of going from one directories to another just to delete all the files they contain. We also have to remember that the DEL command was used only to delete files. Once we have clear out the files in a single directories then we cannot used the DEL command to delete the directory. To remove the specific directory then we need to used the RD DOS command to remove the specific directory. Yes RD stand for REMOVE DIRECTORY, so if a single directory have at-least twenty sub-directory then it would really take some time before we can delete the entire directory structure. This is were  the DELTREE command comes in handy.

But before we get excited about it, there one different between the two commands. The DEL is an internal command, meaning when the DOS OS is loaded we can use it at will. While the DELTREE.EXE command is an external command, meaning the it is not included in the DOS OS. We need to have the disk source where all the command is located and have it copied to the hard drive so that we can use I. Now from the DOS prompt we just need to type the DELTREE and the the name of the directory that we need to erase. Be very aware once we have executed the command all the deleted files and directories will be permanently deleted from the hard drive.

c:\deltree d:\Sample1

Any DOS command that you would like to share?




Enhanced by Zemanta

No comments:

Post a Comment


Here Are Some of My Most Popular Posts Since Day One.

If you like my blog Please Subscribes to my RSS Feed for updates and more

Rydertech

↑ Grab this Headline Animator


Subscribe via email

Enter your email address:

Delivered by FeedBurner
Your Email Will never be shared or Made Public

Related Posts Plugin for WordPress, Blogger...