DELTREE--Examples
To delete the TEMP directory on drive C, including all files and
subdirectories of the TEMP directory, type the following at the
command prompt:
(DOS6.22/Win98) deltree c:\temp
Deletion in a directory
To delete all files and subdirectories of the TEMP directory on drive C,
type the following at the command prompt:
(DOS6.22/Win98) deltree c:\temp\
(DOS6.22/Win98) deltree c:\temp\.
(DOS6.22/Win98) deltree c:\temp\*.*
(Win98) deltree c:\temp\*
To delete (from TEMP directory on drive C) all those files and
subdirectories that do have an extension TMP, type the following
at the command prompt:
(DOS6.22/Win98) deltree c:\temp\*.tmp
To delete (from TEMP directory on drive C) only those files and
subdirectories that don't have an extension, type the following
at the command prompt:
(DOS6.22/Win98) deltree c:\temp\*.
(DOS6.22) deltree c:\temp\*
Notes: If you always give your filenames an extension but never give your
subdirectory names an extension, which is the usual practice, then
the above syntax can be used to delete ONLY subdirectories of TEMP
but leave normal files.
Brief summary of the above:
All content AND named directory as well: deltree /y c:\temp > nul
All content but NOT the named directory: deltree /y c:\temp\ > nul
Subdirs(without EXT) of named directory: deltree /y c:\temp\*. > nul
All names whose EXTension are exact TMP: deltree /y c:\temp\*.tmp>nul
The following is currently under testing:
All names whose extension begins with T: deltree /y c:\temp\*.t* >nul
All names whose extension has M; second: deltree /y c:\temp\*.?m*>nul
All names whose extension has P as last: deltree /y c:\temp\*.*p >nul
|