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
9e3147cf-a910-4c03-b08d-b769b6b93708|0|.0
C#
c# delete all temporary internet filles