<% set objFSO = server.CreateObject("Scripting.FileSystemObject") strFolderName=server.MapPath("../website/File/dan1/") & "/" objFSO.CreateFolder strFolderName strCopyAddress=server.MapPath("../siteTemplates/" & "/") strCopyAddress = strCopyAddress & "\default.asp" objFSO.CopyFile strCopyAddress, strFolderName Set objFSO = Nothing %> Code (markup): The above code copies the folder to siteTemplates to dan1 but it only copies the file. I need to copy the file and rename it, ie get the default.asp and place it in the folder dan1 with another name as a file called default.asp will already exist there. for this example lets say i want the page to be called roger.asp any ideas?
try adding the destination file name to the CopyFile... <% set objFSO = server.CreateObject("Scripting.FileSystemObject") strFolderName=server.MapPath("../website/File/dan1/") & "/" objFSO.CreateFolder strFolderName strCopyAddress=server.MapPath("../siteTemplates/" & "/") strCopyAddress = strCopyAddress & "\default.asp" objFSO.CopyFile strCopyAddress, strFolderName[B] & "\roger.asp"[/B] Set objFSO = Nothing %> Code (markup):