C # File Deletion gadgets

Source: Internet
Author: User

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 #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.