VB .NET: how to use wildcards to delete files in batch mode?
Posted by NosaLee in .NET Programming on 27-07-2012. Tags: .NET FAQ, .NET Programming Experience, .NET Skills, C# FAQ, C# Programming Experience, C# Skills, VB .NET FAQ, VB .NET Programming Experience, VB .NET Skills
Author: Nosa Lee
Original Address: http://www.seeksunslowly.com/vb-net-how-to-use-wildcards-to-delete-files-in-batch-mode
To reprint this article, please indicate the source, thank you.
_____________________________________
In the programming work, we usually need to use wildcards to delete files in batch mode.
For .NET, it is very easy, does not need to do a circulation in a directory.
Just need to use Kill method!
Sample Code (VB 2008):
Microsoft.VisualBasic.FileSystem.Kill("E:\test\*.jpg")
For C#, you can also use kill to delete files in batch mode with wildcards, but please note that you need to using Microsoft.VisualBasic namespace.

PC Freeware Recommended
.NET WYSIWYG HTML Editor (100% FREE)
1Tree
Access Password Recovery (100% FREE)
Advanced Date Time Calculator
Auto Mail Sender
Date Time Counter
Duplicate File Finder Mini (100% FREE)
Easy Work Time Calculator
Email Checker Basic (100% FREE)
File & Folder Lister (100% FREE)
Free Online Color Converter (100% FREE)
KeyMusic (100% FREE)
Online PHP Syntax Checker (100% FREE)
PC WorkBreak (100% FREE)
Process Guard for Developer (100% FREE)
tail for Windows (100% Free)
VB 6 Pure Code Lines Calculator (100% FREE)