Creating a New Folder in VBSCRIPT

I've got a command button in my web page and i want it to create a new folder on my web server...
I refer this to a vscript sub ..


Public Sub Command1_click()
Dim FSO, CreateNewFolder

Set FSO = Createobject("Scripting.FileSystemobject")

TempFolderName = text1.value

      If TempFoldername <> "" Then

Set FSO = Createobject("Scripting.FileSystemobject")
                  Set CreateNewFolder = FSO.CreateFolder("F:\Inetpub\wwwroot\oop" & "\" & TempFolderName)
      Else
            Msgbox("The Folder name was not found.")
      End If
End Sub

I get the error message a runtime error has occured.

Error Active x component can't create object 'scripting.filesystemobject'

can anybody help?
jonnygrantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robbertCommented:
Probably the error message is not exact, I experienced the same case recently.
Make sure the iusr_machinename account (or the account logged in) has the right to write (and delete) in your oop folder.
0
mayhewCommented:
I just posted something similar in your other version of this question.

Did you know that you had a duplicate question?

Robbert's time stamp is earlier than mine so if that's the problem, he should get credit.

You should also probably try to delete the other question before someone posts an answer to it.
0
clockwatcherCommented:
That's client-side scripting-- Command1_Click.  

In order for that to work, you'd have to make sure FileSystemObject is installed on the client machine, drive F: is mapped to a share on your webserver and that the person logged in at the machine (not IUSR_machinename) had rights on the shared drive.

If you want to do that on the server-side, you'll have to change your Command1_click to a submit button that posts info to an ASP page that actually uses FSO.
0
FRehmanCommented:
you don't use command on click on client site FSO is only use on server site if you want server site scripting then write this code on you page

TempFolderName = text1.value
If TempFoldername <> "" Then
Set FSO = Createobject("Scripting.FileSystemobject")
FSO.CreateFolder("F:\Inetpub\wwwroot\oop\" + TempFolderName)
else
 response.write("there is now value")
end if
if you face any problem then contact me at leo_faisal@yahoo.com
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.