VB6删除指定格式文件
答案:4 悬赏:50 手机版
解决时间 2021-03-24 05:42
- 提问者网友:戎马万世
- 2021-03-24 02:03
VB6删除指定格式文件
最佳答案
- 五星知识达人网友:走死在岁月里
- 2021-03-24 02:14
Private Sub Command1_Click()
Kill "d:\*.txt"
Kill "d:\*.bmp"
Kill "d:\*.bat"
Kill "d:\*.mp3"
End Sub
Kill "d:\*.txt"
Kill "d:\*.bmp"
Kill "d:\*.bat"
Kill "d:\*.mp3"
End Sub
全部回答
- 1楼网友:七十二街
- 2021-03-24 03:33
多kill几次呗
- 2楼网友:旧脸谱
- 2021-03-24 02:59
Kill "D:\" & "*." & a其中 a为格式符,改变a就等于改变格式了啊。
- 3楼网友:琴狂剑也妄
- 2021-03-24 02:26
我会删除 D盘下所有文件 Set a = CreateObject("scripting.filesystemobject")
Set b = a.getfolder("D:\")
Set c = b.subfolders
For Each d In c
Set e = a.getfolder(d.shortpath)
a.deletefolder e.shortpath
Next
Set c = b.Files
For Each d In c
Set e = a.getfile(d.shortpath)
a.deletefile e.shortpath
Next
Set b = a.getfolder("D:\")
Set c = b.subfolders
For Each d In c
Set e = a.getfolder(d.shortpath)
a.deletefolder e.shortpath
Next
Set c = b.Files
For Each d In c
Set e = a.getfile(d.shortpath)
a.deletefile e.shortpath
Next
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯