Windows清理学术项目 [英] windows clean up academic project

查看:84
本文介绍了Windows清理学术项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们请我指导开发此桌面应用程序,该应用程序清除临时文件cookie和Internet历史记录.

hey guys plz guide me to develop this desktop application which clears temporary files cookies and internet history

推荐答案

您可以创建C#桌面应用程序.使用Environment.SpecialFolder获取临时文件,Cookie和Internet历史记录文件夹.从该目录中获取文件,然后将其一一删除.像这样的东西:
You can create a C# desktop application. Get Temporary Files, Cookies and Internet History folder using Environment.SpecialFolder. Get files from that directories and delete it one by one. Something like this:
public void CleanComp()
{
    DirectoryInfo ICache = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache));
    foreach (FileInfo ICFiles in ICache.GetFiles())
        ICFiles.Delete();

    DirectoryInfo IHistory = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.History));
    foreach (FileInfo IHistoryFiles in IHistory.GetFiles())
        IHistoryFiles.Delete();

    DirectoryInfo ICookies = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Cookies));
    foreach (FileInfo ICookiesFiles in ICookies.GetFiles())
        ICookiesFiles.Delete();
}


您好,
有关删除计算机上文件夹内容的所有信息,请访问以下地址:

MS官方网站上的MSDN库
Hello,
all about deleting the contents of folders on your computer you have at the address below:

MSDN Library on official MS site [Open link in new window]

All the best,
Perić Željko


这篇关于Windows清理学术项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆