ibcadmin 发表于 2015-9-2 09:31:16

c#获取QQ旋风下载记录

转载,代码未经本人测试
/*
* 用户:从前的我
* 日期:2015/8/26
*/
using System;
using System.IO;

namespace GetXf
{
    class Program
    {   
      public static void GetXfDownloadRecords()
      {
            //Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)获取“AppData\Roaming\”的路径
            string xfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Tencent\QQDownload\115248456\SpeedLogs\";
            string[] str=Directory.GetFiles(xfPath);
            foreach(string s in str)
            {
                Console.WriteLine(Path.GetFileNameWithoutExtension(s));//输出所有文件名(既QQ旋风的下载记录),不含扩展名。
            }
      }
      public static void Main(string[] args)
      {
            GetXfDownloadRecords();
            Console.ReadKey(true);
      }
    }
}

页: [1]
查看完整版本: c#获取QQ旋风下载记录