CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  C#

将文件 删除 到回收站 用怎样的代码?

楼主property1(lubiao)2004-09-02 19:31:19 在 .NET技术 / C# 提问

如题 问题点数:20、回复次数:4Top

1 楼net_lover(【孟子E章】)回复于 2004-09-02 19:46:11 得分 20

Unfortunately,   the   Environment.SpecialFolder   enumeration   does   not   include   values   for   all   of   the   special   folders   supported   by   the   Windows   API   and   accessible   by   the   SHGetFolderPath   function.   For   example,   you   can't   obtain   the   回收站   directory   location   from   Environment.GetFolderPath.   To   obtain   locations   that   aren't   identified   by   Environment.SpecialFolder,   you   have   to   use   P/Invoke   to   call   SHGetFolderPath   or   SHGetFolderLocation   Windows   API   functions.   Even   with   those   restrictions,   Environment.GetFolderPath   is   quite   useful.   You   should   use   it   to   obtain   special   folder   locations   rather   than   assuming   a   particular   path.  
  You   can   obtain   the   path   to   the   system   directory,   by   the   way,   through   the   Environment.SystemDirectory   property,   or   by   calling   Environment.GetFolderPath   and   passing   Environment.SpecialFolder.System.  
  Another   important   directory   is   the   current   directory:   the   directory   in   which   the   application   is   executing.   The   Environment.CurrentDirectory   property   will   report   the   current   directory,   and   also   will   allow   you   to   change   the   application's   current   location.  
  Top

2 楼net_lover(【孟子E章】)回复于 2004-09-02 19:52:43 得分 0

vb的例子  
  http://www.developerfusion.com/show/179/Top

3 楼hxhbluestar(贺星河)回复于 2004-09-02 22:12:17 得分 0

学习!Top

4 楼csq0516(阿松)回复于 2004-09-03 02:37:21 得分 0

upTop

相关问题

  • 如何删除文件到回收站?
  • 删除文件到回收站
  • win-xp删除文件,不经过回收站,如何设置让删除的文件到回收站?
  • 删除的文件为何不在回收站里面?(回收站属性没有设置成永久删除)
  • 如何将文件删除至回收站中
  • 如何删除一个文件夹至回收站中?
  • 如何获得回收站里被删除文件的名称?
  • 删除文件至回收站的一个问题
  • 怎样不经过回收站删除文件,请具体点
  • 有没有删除文件到回收站中的API呀?

关键词

  • 回收站
  • getfolderpath
  • specialfolder
  • shgetfolderpath
  • environment
  • obtain
  • directory
  • special folder
  • locations
  • path

得分解答快速导航

  • 帖主:property1
  • net_lover

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo