C# Delete All Temporary Internet Filles (Csharp kullanaak internet temporary filles silmek)

23. July 2009

Read this article in your language IT | EN | DE | ES

Merhaba arkadaşlar bu projede sizlere  internet saylarında girdikten sonra bilgisayar sistemiz

de bulunan cache file nasıl  temizleriz onu  görelim 

 gene  projeme örnek bir  vs 2008  kulanarak  bir console application oluşturacağım

 unutmadan projemize  system.windows.forms namespace dahil edelim references kısmından

using System;
using System.IO;
using System.Windows.Forms;

namespace TemporaryFileCleaner
{
    class Program
    {
        static void Main()
        {
            ClearFolder(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)));

            Console.WriteLine("All  data  was deleted  ");
            Console.ReadLine();
        }

        static void ClearFolder(DirectoryInfo diPath)
        {
            if (diPath == null) throw new ArgumentNullException("diPath");

            foreach (var fiCurrFile in diPath.GetFiles())
            {

                try
                {
                    fiCurrFile.Delete();
                }
                catch (Exception e)
                {

                    MessageBox.Show(e.Message +  "data used by the system  ", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            foreach (var diSubFolder in diPath.GetDirectories())
            {
                ClearFolder(diSubFolder); /// tüm  klasörler ve alt klasörler  içinde gezerek  temizleme işlemni sağlıyoruz

            }

        }

    }
}

Evet arkadaşlar bir örnek  projenin sonuna gelmiş olduk  tekrar yeni bir projde görüşmek üzere herkeze iyi  calışmalar 

Saygılarımla Orhan Türk

 

FacebookDigg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

C#

Comments

8/14/2009 9:05:14 PM #
Very interesting topic will bookmark your site to check if you write more about in the future.
8/16/2009 7:24:31 PM #
Please let me know if you are interested to work as article writer for me? I can offer $10/article.
8/27/2009 6:02:55 AM #
Would you like to post a guest post on my blog?
5/16/2010 3:32:40 PM #
Hello I am so delighted I found your blog, I really found you by mistake, while I was looking on Yahoo for something else, Anyways I am here now and would just like to say thanks for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have time to read it all at the moment but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the great work.
5/17/2010 12:53:12 AM #
I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the great work.
5/26/2010 1:46:32 PM #
Sorry if my english is not good. i just desire to say i like this article a lot. many thanks
6/2/2010 8:10:10 PM #
I have been trying to Gain access to this website for a while. I was using IE then when I tried Safari, it worked just fine? Just wanted to bring this to your attention. This is really good site. I have a bunch myself. I really admire your design. I know this is off topic but,did you make this layout yourself,or purchase from somewhere?
6/3/2010 4:33:58 AM #
You lost me, buddy. I mean, I suppose I get what youre saying. I understand what you are saying, but you just seem to have forgotten that there are some other people in the world who view this issue for what it really is and may not agree with you. You may be turning away alot of people who might have been fans of your blog.
6/4/2010 4:50:36 AM #
Intimately, the post is really the freshest on this laudable topic. I agree with your conclusions and will eagerly look forward to your incoming updates. Just saying thanks will not just be enough, for the phenomenal clarity in your writing. I will immediately grab your rss feed to stay abreast of any updates. Genuine work and much success in your business endeavors!
6/5/2010 11:44:49 AM #
Give me a lever long enough and a fulcrum on which to place it, and I shall move the world. Daniel
6/6/2010 12:29:45 AM #
Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



Sayfa 0.015625 saniyede yuklendi.