asp删除文件夹下的所有文件
asp删除文件夹下的所有文件如abc\aaa\d删除aaa文件夹,保留abc谢谢怎么没人回答了呢...
asp删除文件夹下的所有文件
如 abc\aaa\d
删除aaa文件夹,保留abc 谢谢
怎么没人回答了呢 展开
如 abc\aaa\d
删除aaa文件夹,保留abc 谢谢
怎么没人回答了呢 展开
展开全部
function del_file(path)
dim folder, folders, files, file
set folder = fso.getfolder(path)
set files = folder.files
response.write "<B>"&path&"</B><BR>"
for each file in files
response.write "<BR>"&file.name
fso.deletefile file.path,true
response.write " <font color=red>删除成功</font></br>"
next
set folders = folder.subfolders
for each f in folders
del_file f.path
next
end function
dim folder, folders, files, file
set folder = fso.getfolder(path)
set files = folder.files
response.write "<B>"&path&"</B><BR>"
for each file in files
response.write "<BR>"&file.name
fso.deletefile file.path,true
response.write " <font color=red>删除成功</font></br>"
next
set folders = folder.subfolders
for each f in folders
del_file f.path
next
end function
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询