Naming new folder

Results 1 to 2 of 2

Thread: Naming new folder

  1. #1
    Join Date
    Dec 1969

    Default Naming new folder

    Hi, am trying give a new folder that a created the users id that is passed through a variable. It is not allowing me to do so, I believe because I am using the incorrect sytax. <BR><BR>CODE: <BR>set s=server.createobject("scripting.filesystemobject" ) <BR> s.createfolder("d:
    ew folder\"" & ID &"") <BR><BR>ERROR: <BR><BR>Error Type: <BR>Microsoft VBScript compilation (0x800A0409) <BR>Unterminated string constant <BR><BR>What is the corrrect way to go about this?

  2. #2
    Sreedharan Guest

    Default RE: Naming new folder

    CODE: <BR>set s=server.createobject("scripting.filesystemobject" ) <BR>s.createfolder("d:
    ew folder\" & ID) <BR><BR>I would advise you to first check for the existence of the folder before trying to create it.<BR><BR>CODE: <BR>set s=server.createobject("scripting.filesystemobject" ) <BR>If Not s.FolderExists(("d:
    ew folder\"" & ID) Then<BR> s.createfolder("d:
    ew folder\" & ID) <BR>End If<BR>

Posting Permissions

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