复制某目录下所有文件至指定目录
Setfso=CreateObject("Scripting.FileSystemObject")
SetCur_Folder=fso.getfolder(Server.MapPath(SourcePath))''源文件夹
Distination_Path="c:est"
Setsub_files=Cur_Folder.files
foreacheach_fileinsub_files
sub_file_path=each_file.name
fso.CopyFileServer.MapPath(SourcePath)&"/"&sub_file_path,Distination_Path&"/"&sub_file_path,True
Next
Setfso=CreateObject("Scripting.FileSystemObject")
SetCur_Folder=fso.getfolder(Server.MapPath(SourcePath))''源文件夹
Distination_Path="c:est"
Setsub_files=Cur_Folder.files
foreacheach_fileinsub_files
sub_file_path=each_file.name
fso.CopyFileServer.MapPath(SourcePath)&"/"&sub_file_path,Distination_Path&"/"&sub_file_path,True
Next
本文介绍了一段使用 VBScript 实现将指定源目录下的所有文件批量复制到目标目录的方法。通过创建 FileSystemObject 对象来操作文件系统,实现文件的复制功能。


被折叠的 条评论
为什么被折叠?



