asp中的删除文件

  if oldphotofile<>"" then
      set fs=CreateObject("scripting.filesystemobject")
   set folder=fs.GetFolder(Server.MapPath("/center/lifephoto/"))
   dim f_time,mylast_time,mylast_file
   for each file0 in folder.files
   if file0.name=oldphotofile then
    'response.write "找到文件:"&file0.name&"<br>"
    'response.write "folder:"&folder&"<br>"
    'response.write "正在删除文件:"&file0.name&"<br>"
    'response.write "删除"&file0.name&"成功!<br>"
    file0.delete
    exit for
   end if  
   next
   set fs=nothing
   set folder=nothing
上一篇:aws EC2二代镜像迁移阿里云ecs磁盘user_config.json生成脚本


下一篇:利用Java动态生成 PDF 文档