Command: xdel
XDEL is an extended file deletion tool, (actual version: 1.0.8!)
Syntax:
XDEL [/options] [@][d:][path]filename[.ext]... [/options]
Options:
@ the following filename is the name of a file list
d: drive which xdel is to search
path directory where search is to begin
filename.ext file to be deleted (wildcards allowed)
/D remove empty subdirectories
/N or /Y delete specified files with no warning (CAREFUL!)
/O overwrite before deleting - file contents PERMANENTLY LOST
/P prompt before deleting each file
/R delete read-only files
/S delete files in subdirectories
/H or /? this help message
Multiple files may be specified on the command line.
Comments:
XDEL was introduced by DR-DOS and a long time later M$ introduced
DELTREE. This implementation of XDEL is intended to be 100% compatible
with DR-DOS version. If you find anything different, consider it a bug
and send me a notofication, please.
XDEL can be used in place of DELTREE, but in fact it has more options,
including:
- Default is not to delete Read/Only files,
- Option to include _or_not_ subdirectories,
- Option to wipe all files before deleting,
- Options to ask or not for confirmation, individualy or globally.
XDEL has the following ERRORLEVEL / EXITCODES
1 = Syntax error
2 = Could not delete (for any reason, including operator cancel)
3 = Out of memory
Examples:
Differences to deletree:
XDEL /RY *.*
will remove all files, including R/O and it will NOT ask for
confirmation :)
It has one major difference:
XDEL /SRDN DIR\*.*
will delete all files and subdirectories just as
DELTREE /Y DIR\*.*
but the directory DIR\ will NOT be removed (This is the DR-DOS
standard)
See also:
del/erase
deltree
errorlevel/exitcode
rd/rmdir
Copyright © 2002 Alain Mouette, help version 2023 W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.