I am using Server.CreateObject("Scripting.FileSystemObject") to create a folder, then .CopyFile to place a template file into it.
Is it possible to also write a line to this template file before it is saved into the new folder we just created?
To get an idea of where I`m going, here's the existing code:
In the template file, I`d like to include a variable so it is only 1 line such as
<% var1 = 'request.form("id")' %>
Is this possible using good ole asp?
"If a man is a fool, you don't train him out of being a fool by sending him to university. You merely turn him into a trained fool, ten times more dangerous."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is it possible to also write a line to this template file before it is saved into the new folder we just created?
To get an idea of where I`m going, here's the existing code:
Code:
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Create Directory
If Not objFSO.FolderExists(Server.mappath("/myfolder/" & request.form("title") & "")) then
objFSO.CreateFolder(Server.Mappath("/myfolder/" & request.form("title") & ""))
End If
'Copy default.asp file into new dir
ObjFSO.CopyFile Server.mappath("defaultTemplate.asp"), Server.Mappath("/myfolder/" & request.form("title") & "/default.asp")
In the template file, I`d like to include a variable so it is only 1 line such as
<% var1 = 'request.form("id")' %>
Is this possible using good ole asp?
"If a man is a fool, you don't train him out of being a fool by sending him to university. You merely turn him into a trained fool, ten times more dangerous."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~