蓝色信仰

博客园 首页 新随笔 联系 订阅 管理

Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder(sPath)
mpath="d:\1"    
rem:这里设置你要拷进去的文件夹路径
Set oFiles = oFolder.Files
For Each oFile In oFiles
   If FormatDateTime(ofile.DateCreated,1)=FormatDateTime(Date,1) Then    
   ofso.CopyFile ofile.Path,mpath
   End if
Next

Set mfolder = ofolder.SubFolders
For Each mfo In mfolder
   If FormatDateTime(mfo.DateCreated,1)=FormatDateTime(Date,1) Then
   ofso.CopyFolder mfo.Path,mpath
   End if
Next

Set ofolder=Nothing
Set ofso=Nothing

End Function

FilesTree("c:\tddownload")
rem:这里设置原本的文件夹路径...

posted on 2012-09-25 12:00  蓝色信仰  阅读(1709)  评论(0编辑  收藏  举报