这里是一个实现将一个文件夹中的内容,包括子文件夹中的内容,复制到另一个文件夹中的asp代码。在使用的过程中要将文件夹的相对路径转换成绝对路径。转换的方法是使用server.mappath。
<%
startfile_1="d:aaa" '原始文件夹
tofile_1="c:bbb" '目标文件夹
Call copyfile(startfile_1,tofile_1)
response.write "完成"
function copyfile(startfile,tofile) 'startfile为原始文件夹路径,tofile为目标文件夹路径
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
Set MyFolder=MyFileObject.GetFolder(startfile)
domain=Split(startfile,"")(UBound(Split(startfile,"")))
For Each thing in MyFolder.Files'复制里面的文件
s=Split(thing,"")
a=UBound(s)
s3=Split(thing,"")(a)
MyFileObject.CopyFile thing,tofile&""&s3
Next
For Each thing in MyFolder.SubFolders'复制子文件夹
s=Split(thing,"")
a=UBound(s)
s3=Split(thing,"")(a)
response.write thing&"
"
response.write s1&""&domain&""&s3
response.write "
"
MyFileObject.copyFolder thing,tofile&""&s3
Next
end function
%>
孢子2生物进化中文版(Spores)
孢子2生物进化中文版让我们来做一回疯狂的博士,打造一个属于自
叫我万岁爷九游官方版
叫我万岁爷带你体验当换地点感觉,全新的模拟手游大作让你开始一
梦回凤歌
梦回凤歌手游中你将步入古代的宫廷纷争之中,本想度过美好幸福的
洋果子店rose最新版本
洋果子店最新版是一款十分容易让人垂涎的开店经营类手游。游戏玩
明日大亨最新版
明日大亨手游,一个非常经典有趣的模拟经营类型的商战手游,在游