Creating Folders on the Fly

Results 1 to 2 of 2

Thread: Creating Folders on the Fly

  1. #1
    Join Date
    Dec 1969

    Default Creating Folders on the Fly

    I&#039;m trying to create a folder on the fly with the name being a form field that the user fills in. I can&#039;t seem to find the right syntax to pass the variable into the. Does anyone know how this is done. Below is an example of my code. Thanks,<BR><BR>&#060;%@ Language=VBScript %&#062;<BR><BR>&#060;% <BR>Dim filesys, newfolder, VCase<BR>VCase=Request.Form ("Case")<BR>set filesys=CreateObject("Scripting.FileSystemObject") <BR>If Not filesys.FolderExists("c:inetpubwwwrootIntranetERTA ttachments\" & VCase & "") Then<BR> newfolder = filesys.CreateFolder("c:inetpubwwwrootIntranetERTA ttachments\" & VCase & "")<BR> Response.Write("A new folder &#039;" & newfolder & "&#039; has been created") <BR>End If<BR>%&#062;

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Creating Folders on the Fly

    Nothing really wrong with the code<BR><BR>&#062;Request.Form ("Case")<BR>you have an space there for some reason<BR><BR><BR>just make sure Request.Form("Case") has a value

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts