aspフォルダコードのコピー

1179 ワード

 
  
Function CopyMyFolder(FolderName,FolderPath)
sFolder=server.mappath(FolderName)
oFolder=server.mappath(FolderPath)
set fso=server.createobject("scripting.filesystemobject")
if fso.folderexists(server.mappath(FolderName)) Then'
   if fso.folderexists(server.mappath(FolderPath)) Then'
   fso.copyfolder sFolder,oFolder
    Else '
            CreateNewFolder = Server.Mappath(FolderPath)
            fso.CreateFolder(CreateNewFolder)
            fso.copyfolder sFolder,oFolder
   End if
 CopyMyFolder=" ["&server.mappath(FolderName)&"] ["&server.mappath(FolderPath)&"] !"
Else
CopyMyFolder=" , ["&sFolde&"] !"
End If
set fso=nothing
End Function
FolderName="2006" '
FolderPath="2008" '
response.write""&CopyMyFolder(FolderName,FolderPath)&"" ' 2006 2008
%>