C#獲取QQ旋風的下載記錄,
1 /*
2 * 用戶:從前的我
3 * 日期:2015/8/26
4 */
5 using System;
6 using System.IO;
7
8 namespace GetXf
9 {
10 class Program
11 {
12 public static void GetXfDownloadRecords()
13 {
14 //Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)獲取“AppData\Roaming\”的路徑
15 string xfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Tencent\QQDownload\115248456\SpeedLogs\";
16 string[] str=Directory.GetFiles(xfPath);
17 foreach(string s in str)
18 {
19 Console.WriteLine(Path.GetFileNameWithoutExtension(s));//輸出所有文件名(既QQ旋風的下載記錄),不含擴展名。
20 }
21 }
22 public static void Main(string[] args)
23 {
24 GetXfDownloadRecords();
25 Console.ReadKey(true);
26 }
27 }
28 }