Im trying to copy a folder with the copyfoldr-method, but when I try to add a new foldername through an input-form something goes wrong
<form method="get" action="user_profile.asp">
Folder Name: <input type="text" name="folder_name" />
<br /><br />
<input type="submit" value="Submit" />
</form>
<%
folder_name=Request.QueryS
tring("fol
der_name")
set FS=server.createobject("Sc
ripting.Fi
leSystemOb
ject")
pathtoOriginalFolder=serve
r.mappath(
"/graphics
/common/us
ergraphics
/Europe/")
pathtoNewFolder=server.map
path("/gra
phics/comm
on/usergra
phics/" & folder_id & "/" & folder_name)
fs.copyfolder pathtoOriginalFolder,patht
oNewFolder
set fs=nothing
%>
folder_id is the user_id coming from an mssql-database and that is correct.
If I let the pathtoNewFolder end with folder_id then the originalfolder is copied successfully to that folder_id.
I assume that where Im going wrong has got something to do with the number of quotations in the pathtoNewFolder-path.
Start Free Trial