eHow launches Android app: Get the best of eHow on the go.

How To

How to Create a New Folder With Classic ASP

Member
By sauvagii
User-Submitted Article
(0 Ratings)

ASP Classic is the precursor to ASP.NET. It can still be used today to create many versatile web applications. In this article I will show you how to use ASP to create a new folder.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • ASP enabled web server
  • Web page edit software
  1. Step 1

    Open a blank ASP page in your web page editing software.

  2. Step 2

    Enter the following code:

    <%
    'Create the myFSO variable
    Dim myFSO
    'Initialize myFSO as a file system object
    SET myFSO = Server.CreateObject("Scripting.FileSystemObject")

    'If the folder does not already exist then create the folder
    If NOT myFSO.FolderExists("FOLDERNAME") Then
    myFSO.CreateFolder("FOLDERNAME")

    'If the folder does exist, inform the user
    Else
    Response.Write "This folder already exists!"
    End If

    'deconstruct myFSO
    SET myFSO = NOTHING
    %>

  3. Step 3

    Replace FOLDERNAME with the path and desired name of your new folder. Or use a variable to define the folder to be created.

  4. Step 4

    Add any additional code as desired. Using only this code will create the folder but it will have limited uses.

  5. Step 5

    Name and save file as .asp. Test in a web browser.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Tags
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics