using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using static System.Net.WebRequestMethods;
using System.Threading;
using System.Configuration;
using System.Data;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//创建无参的线程
Thread thread1 = new Thread(new ThreadStart(DelFile));
//调用Start方法执行线程
try

这是一个C#程序,用于创建一个线程定期检查并删除指定文件夹(D:Camera)中14天前的文件。程序通过`DirectoryInfo`获取文件夹中的文件,然后对比文件的创建时间,如果文件创建时间早于当前日期14天,就将其删除。
最低0.47元/天 解锁文章
553





