Share via


delete

This command deletes a file or directory tree.

delete [filesys path]

Parameters

  • filesys path
    Specifies the full path of the file or directory to be deleted. If a directory is specified, all files and subdirectories inside the directory are deleted along with the directory itself.

Remarks

This command will not report a failure if the file or directory to be delete does not currently exist.

Once the file or directory is deleted, if the directory that contained the file or directory is now empty, it is deleted automatically. This applies recursively up the directory hierarchy.

Example

The following code example deletes a file called myfile.txt:

delete \volume\myfile.txt

See Also

File System Commands

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.