Generally, when publishing a website to a server, you need to delete existing files on the server to speed up the upload.
Manual deletion is required every time, which is very troublesome. After deletion or wrong release, it is a tragedy.
If you use bat to batch process files, you can replace the file content. Therefore, you have created a deletion tool.
Usage:
Create del.txt in the directory to be deleted
The content format is as follows:
// Delete the WEB \ images directory
Rd web \ Images
// Delete All JS Directories
Rd JS/s
// Delete an object
Del *. EXE/s
Del images \ *. jpg
Del config \ log4net. config
// Delete an object whose modification time is earlier than the specified time
Deltime *. dll 2012-01-01
// Replace the File Content
Replace web. config DEBUG = "true"> DEBUG = "false">
// Move files or directories
Ren app_data \ a.txt B .txt
Ren HELP \ style \ newhelp
Source code download: http://files.cnblogs.com/zjfree/DelFile.rar
Development Environment: win2003 + vs2005 +. net2.0 + C #