VBS脚本COPY指定日期文件及文件夹

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:这里设置原本的文件夹路径...

你可能感兴趣的:(copy)