Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

File System Object and ASP

  • 11-02-2004 7:26pm
    #1
    Registered Users, Registered Users 2 Posts: 7,113 ✭✭✭


    hey all

    I have a problem with ASP and the File system object!

    I want to be able to create a folder in asp! I want whatever I type in the form to be the name of the new folder. But I'm having problems ...

    here's my code if anyone can help!

    folder.html
    <html>

    <form name="folder" action="folder.asp" method="get">
    <input type="text" cname="fold">
    <input type="submit" value="Login">
    </form>

    </html>



    Folder.asp
    <%

    strcname = Request.Form("cname")

    Dim objFSO, cname
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    objFSO.CreateFolder("C:\& cname &")

    %>


    I can't figure out the problem. I know it's something to do with the &cname&!

    thanks in advance,
    mada!


Comments

  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    Read, re-read and then read again.. your naming was off.. My changes in bold below..
    Originally posted by mada999
    folder.html
    <html>

    <form name="folder" action="folder.asp" method="get">
    <input type="text" name="cname">
    <input type="submit" value="Login">
    </form>

    </html>



    Folder.asp
    <%

    strcname = Request.Form("cname")

    Dim objFSO, cname
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    objFSO.CreateFolder("C:\" & strcname )

    %>


Advertisement