ecluley Posted November 24, 2007 Share Posted November 24, 2007 I am trying to have a script make a folder then copy some files into itmy code is as follows:dim fs,fset fs=Server.CreateObject("Scripting.FileSystemObject")set f=fs.CreateFolder("test")fs.CopyFile "new\*.mdb", "test"set f=nothingset fs=nothingWhen the code executes I get a errorMicrosoft VBScript runtime error '800a0046'Permission denied/adduser_update.asp, line 10Line 10 is set f=fs.CreateFolder("test")I have emailed my hosting company and they say permissions for asp scripts to write to the disk are enabled. what am I doing wrong?ThanksEwen Link to comment Share on other sites More sharing options...
dev Posted November 25, 2007 Share Posted November 25, 2007 Problem is ASP do not know where to create your folder "test". you have to specify a physical/virtual path.either set f=fs.CreateFolder("C:\Inetpub\wwwroot\test") orset f=fs.CreateFolder(Server.MapPath("test"))it will be ok. Link to comment Share on other sites More sharing options...
ecluley Posted November 25, 2007 Author Share Posted November 25, 2007 amazing mate! worked a treat. cheers for the quick response too! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.