Be Inquisitive ! Be Curious !! Explore !!! Enjoy !!!!

Deleting files in MS-DOS without a prompt.

| Monday, August 15


Issue

Deleting files in MS-DOS without a prompt.

Cause

To help prevent files from becoming accidentally deleted Microsoft will warn you before deleting files or folders.

Solution

By default Microsoft Windows will not prompt a user or give a user a prompt or warning when deleting files on a computer using the del command. However, when attempting to delete a directory using the deltree or rmdir command on a directory that is not empty you will receive a warning or error message about deleting the directory.
To suppress the prompting use the deltree command and add the tag /y.  Here is an example of how the whole command would look, deltree c:\windows\temp\*.* /y However, this does not work in all versions of Windows and MS-DOS.
If this command does not work we would recommend that you create a batch file with the below command in the batch file.
echo y | del %1\*.*
Once created, you can type the name of the batch file then the name of the directory that you wish to delete.
Microsoft Windows 2000 and Windows XP users
Users who wish to delete a directory containing files in a MS-DOS session running under Microsoft Windows 2000 or Windows XP can also use the rmdir or rd command with the /S option.
Remember that when you delete files or directories from the computer they are permanently removed, so be careful! Microsoft Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, and later versions of Windows users deleting files through MS-DOS should realize that all deleted files will not be sent to the recycle bin.
Other users using MS-DOS through Windows
Users running MS-DOS through later versions of Microsoft Windows can also utilize the erase command to delete files without a prompt. Microsoft Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, and later versions of Windows users deleting files through MS-DOS should realize that all deleted files will not be sent to the recycle bin.

0 comments:

Post a Comment