---
title: "删除指定路径的文件"
author: "LvMax"
date: "2011-05-04T17:59:17Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2011-05-04T17:59:27Z"
id: 1028584
url: "https://lvmax.iteye.com/blog/1028584"
---

```c#

string path = this.Server.MapPath("XXXXX");   //路径
FileInfo file = new FileInfo(path);
if (file.Exists == true)
{
    file.Delete();
}

```