Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Probs with Scripting.FileSystemObject

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,

I'm updating a site. I have to add a directory every time a record is added. I wrote the following code but it seems to freeze up the server every time it's being used. What can it be and how do I solve this issue, please help!!!

Thanks in advance,
Shay

The code:
set fs=createobject("scripting.filesystemobject")
MyFolder=server.mappath("./../stores/" & user_id & "/")
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
Check if the creation was a success or not
If fs.folderexists(MyFolder) then
TheFile = MyFolder & "\index.html"
Set filetemp = fs.CreateTextFile(TheFile,true)
filetemp.WriteLine("redirecting you now!")
filetemp.close
End If
set fs=nothing
 
Try downloading Microsofts Scripting 5.5.
Run this executable on your web server. This will ensure that all ASP code is executed correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top