Command line utility deletefile
Navigation: Diese Seite in Deutsch - Main page - Contents
| Download program or batch file | Operating system | Description |
| deletefile.exe
Version 1.00 |
Windows
(95/98/ME/ NT/2000/XP) |
There is a problem with the internal DEL command of Windows, at least
on Windows NT, service pack 6a. It seems to work fine on Windows 2000.
DEL does neither return a proper ERRORLEVEL nor does it care about stdout and stderr, hence you cannot ensure that a file really gets deleted. Although a command like
The following sequences will not work properly on Windows NT: DEL /Q file.test 2> delerrors.txt
DEL /Q \\server\file.test 2> delerrors.txt
If the command worked correctly, it would touch the file delerrors.txt (reduce its file size to 0) if file.test could be deleted successfully. On the other hand, delerrors.txt would contain the error message returned by DEL and the text "Error." would be written to the console (stdout), if there was an error while trying to delete the file. This works on Windows 2000, but not on Windows NT. The command line utility deletefile.exe
takes care of this. It is supposed to be a replacement for DEL /Q.
DeleteFile file.test 2> delerrors.txt
DeleteFile \\server\file.test 2> delerrors.txt
Any other functionality must be provided by the user, i.e. a batch file.
SET fName=file.test
|
Navigation: Diese
Seite in Deutsch - Main page - Contents
---
All scripts (batch files) and programs provided by www.wabel.de.
Wagner Belmer GbR (WaBel)
(C) 2003 Thomas Belmer
ASAMnet - - PMView - Allee Parkhotel Maximilian - Autospenglerei Belmer - Email - Thomas's homepage - Bieruhr - Panoramas - Amberg live