Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Other versions of this page are also available for the following:
Windows Mobile Not Supported Windows Embedded CE Supported
8/28/2008

This command deletes a file or directory tree.

Syntax

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.

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

Copy Code
delete \volume\myfile.txt

See Also