删除目录下的文件及子目录

  Set objFSO = CreateObject("Scripting.FileSystemObject")

  Set objFolder = objfso.GetFolder("e:aaa")

  For Each objFile In objFolder.Files

  objfile.Delete

  Next

  For Each objSubFolder In objfolder.SubFolders

  objSubFolder.Delete

  Next

 

发表评论

邮箱地址不会被公开。 必填项已用*标注