永发信息网

删除IE临时文件出错

答案:2  悬赏:80  手机版
解决时间 2021-03-19 02:14
  • 提问者网友:伴风望海
  • 2021-03-18 03:09
删除IE临时文件出错
最佳答案
  • 五星知识达人网友:舍身薄凉客
  • 2021-03-18 04:09
重启下试试、
全部回答
  • 1楼网友:我住北渡口
  • 2021-03-18 04:56
据我所知,这个是个文件,而不是文件夹,如果你真的有需要,那就用这个代码吧 可以删除文件夹和下面所有的子文件,子文件夹 'vb 中删除带子文件夹的文件夹 option explicit private sub command1_click() dim strpathname as string strpathname = "" strpathname = inputbox("请输入需要删除的文件夹名称∶", "删除文件夹") if strpathname = "" then exit sub on error goto errorhandle setattr strpathname, vbnormal '此行主要是为了检查文件夹名称的有效性 recursetree strpathname label1.caption = "文件夹" & strpathname & "已经删除!" exit sub errorhandle: msgbox "无效的文件夹名称:" & strpathname end sub sub recursetree(currpath as string) dim sfilename as string dim newpath as string dim spath as string static oldpath as string spath = currpath & "\" sfilename = dir(spath, 31) '31的含义∶31=vbnormal+vbreadonly+vbhidden+vbsystem+vbvolume+vbdirectory do while sfilename <> "" if sfilename <> "." and sfilename <> ".." then if getattr(spath & sfilename) and vbdirectory then '如果是目录和文件夹 newpath = spath & sfilename recursetree newpath sfilename = dir(spath, 31) else setattr spath & sfilename, vbnormal kill (spath & sfilename) label1.caption = spath & sfilename '显示删除过程 sfilename = dir end if else sfilename = dir end if doevents loop setattr currpath, vbnormal rmdir currpath label1.caption = currpath end sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯