文件未删除 [英] file is not deleting

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

问题描述

文件未从此命令中删除

file.delete("\\ int \ specs \ upload \ sku \ 23819 \更改985855NM .htm的分类")

即使没有任何错误.

任何帮助

file is not deleting from this command

file.delete("\\int\specs\upload\sku\23819\Change classification for 985855NM .htm")

even it is not giving any error.

Any help

推荐答案

您的文件路径看起来不正确.为了验证,您确定.htm之前是否有尾随空格,并且在其前面应该有两个\\.我猜似乎文件路径的语法不正确.

您是否尝试过获取文件的文件信息,所以先获取FileInfo f,然后获取f.Delete()

同样,C#中的路径需要在路径名中包含两个\\,否则在其前面放置一个@,例如@"C:\ mypath \ file.txt"
Your file path does not look correct. To verify, are you sure there is a trailing space before the .htm and are there supposed to be two \\s at the front of it. It doesn''t appear to have the correct syntax for a file path is my guess.

Have you tried getting the file info for the file so FileInfo f and then f.Delete()

Also paths in C# need to have two \\ in their path name or else put an @ in front of it like @"C:\mypath\file.txt"


是的,它们在后面.htm之前的空格,您能否根据您的需要为我提供正确的路径.
还是可以修改现有路径..

谢谢.
yes their is trailing space before .htm and can you provide me according to you what should be the correct path.
or can you modify the exsisting path..

Thanks..


这篇关于文件未删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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