鸿 网 互 联 www.68idc.cn

当前位置 : 服务器租用 > 网站制作教程 > vbs > >

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

来源:互联网 作者:佚名 时间:2012-10-13 10:25
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(
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:这里设置原本的文件夹路径...
网友评论
<