I am able to create folders and subfolders with ASP with this:
<%
set objFSO = CreateObject("Scripting.FileSystemObject"
' name your folder
dim basefolder
basefolder = "testing"
sub createfolders()
' create root folder
objFSO.CreateFolder ("c:\Inetpub\ & basefolder)
' create subfolders
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\css"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\img"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\inc"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\js"
end sub
createfolders()
Response.write("all folders created"
set objFSO = nothing
%>
However, what I am trying to do is take in a parameters from user input from text boxes on my web page. So, if the user enters 1234 in the Order# textbox, then attaches a file to upload, then clicks submit, a folder named 1234 will be created on the fly and the uploaded file saved in that folder. If the user enters 1234 in the Order# textbox, then 01 in the Version# textbox, a folder named 1234 AND a subfolder named 01 is created, with the uploaded file saved in both.
I already have the upload piece working, I just need to take in these parameters and save it to these folders/subfolders.
Hope this makes sense. Thanks in advance,
Bob
<%
set objFSO = CreateObject("Scripting.FileSystemObject"
' name your folder
dim basefolder
basefolder = "testing"
sub createfolders()
' create root folder
objFSO.CreateFolder ("c:\Inetpub\ & basefolder)
' create subfolders
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\css"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\img"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\inc"
objFSO.CreateFolder ("c:\Inetpub\ & basefolder & "\js"
end sub
createfolders()
Response.write("all folders created"
set objFSO = nothing
%>
However, what I am trying to do is take in a parameters from user input from text boxes on my web page. So, if the user enters 1234 in the Order# textbox, then attaches a file to upload, then clicks submit, a folder named 1234 will be created on the fly and the uploaded file saved in that folder. If the user enters 1234 in the Order# textbox, then 01 in the Version# textbox, a folder named 1234 AND a subfolder named 01 is created, with the uploaded file saved in both.
I already have the upload piece working, I just need to take in these parameters and save it to these folders/subfolders.
Hope this makes sense. Thanks in advance,
Bob