TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
softairhk
NA
115
0
How to delete files?
Nov 13 2003 1:42 AM
Hello! I would like to know how to delete files? I know the following coding can do copy directory and files, so how to modify it to delete files. public static void copyDirectory(string Src,string Dst) { String[] Files; if(Dst[Dst.Length-1]!=Path.DirectorySeparatorChar) Dst+=Path.DirectorySeparatorChar; if(!Directory.Exists(Dst)) Directory.CreateDirectory(Dst); Files=Directory.GetFileSystemEntries(Src); foreach(string Element in Files) { // Sub directories if(Directory.Exists(Element)) copyDirectory(Element,Dst+Path.GetFileName(Element)); // Files in directory else File.Copy(Element,Dst+Path.GetFileName(Element),true); } }
Reply
Answers (
1
)
ADO in VB.net
Can we move in the console ?