DEL (command line command)

from Wikipedia, the free encyclopedia

DEL or ERASE is a command line command for deleting single or multiple files. It largely corresponds to the rm command under Unix.

The command goes back to CP / M , but was called there ERA. Under 86-DOS this command was ERASEextended, with PC-DOS 1.1 the alias DELwas finally introduced, which ultimately ERASEprevailed over against . For better compatibility with CP / M, DR DOS kept the command ERAas an alias for DEL.

Since the DEL command, similar to rm under Unix, does not issue a security query prior to deletion by default, important system files can all too easily be deleted by writing errors. For this purpose, the parameter was /Pintroduced back in the days of MS-DOS which issues a security query before deleting the file (or before deleting each individual file when using wildcards). If you want to *.*delete with DEL (i.e. all files in the current directory), a security question always appears . Under Windows NT this can be prevented with the parameter /Q.

It was not until Windows NT that the functionality of DEL was significantly expanded. Since then, recursive deletion of files in a directory tree has been possible (parameters /S) and it is possible to filter according to file attributes (parameters /A). With /Fcan also be used to force the deletion of write-protected files (under MS-DOS, the write protection attribute had to be removed first).

Under Windows NT, the DEL command has acquired a certain importance because this command can also be used to delete files that can not be deleted in Windows Explorer , either because the full path including the file name is longer than 255 characters or because the file name is a is a reserved term under Windows NT (for example CON, PRNor NUL).

Web links