.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

The job about forder and file

Posted By: wolf     Posted Date: October 28, 2011    Points:5   Category :C#
Hi all

1:have a forder A ,some file in this forder and the forder B ,a same to A.
2:must delete file in forder B by A. delete:(if the file exist in forder B which the file in forder A.must delete the file in forder B )
3:In the job, i don't know how to use ArrayList in C#. I'm first do the job about the C#, I'm job about the java befor now. so want some help.the valus in the list .but i can't get it to use.
4:how to delete file in C#.

thanks all to help me do this job. your have something out this job,must tell me.

Author: Narayanan             
Posted Date: January 03, 2012     Points: 20   


Delete a file:
      public void DeleteFiles(String Path, String fileType)
string[] files = Directory.GetFiles(Path, fileType);
foreach (string file in files)


Call like this,
 DeleteFiles("Specify Path","Particular File Type");

if you want to delete a bmp file in a NewFolder in the E Disk.

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend