createobject("Scripting.filesystemobject") nt Wrk?

Author Message
ScriptMono

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 3/7/2005
  • Location:
  • Status: offline
createobject("Scripting.filesystemobject") nt Wrk? Monday, March 07, 2005 10:52 PM (permalink)
0
Hi,

Does anyone know how to reference the scripting.filesystem library in vb script on a web page? It's just not like vba where you check a reference in a menu!

Apologies for my noviceness... and thankyou for any help!

Mucho Gracias,

Simon
 
#1
    Snipah

    • Total Posts : 1339
    • Scores: 8
    • Reward points : 0
    • Joined: 11/1/2004
    • Location: Scotland
    • Status: offline
    Re: createobject("Scripting.filesystemobject") nt Wrk? Monday, March 07, 2005 11:13 PM (permalink)
    0
    http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html

    replace the <% with <script language="VBScript"> and the %> with </script>

     
    #2
      ScriptMono

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 3/7/2005
      • Location:
      • Status: offline
      Re: createobject("Scripting.filesystemobject") nt Wrk? Monday, March 07, 2005 11:23 PM (permalink)
      0
      Thanks for your help snipah.

      But really I already use this syntax. It's a data access page. and the CreateObject Function just doesn't create anything!

       
      #3
        Snipah

        • Total Posts : 1339
        • Scores: 8
        • Reward points : 0
        • Joined: 11/1/2004
        • Location: Scotland
        • Status: offline
        Re: createobject("Scripting.filesystemobject") nt Wrk? Monday, March 07, 2005 11:35 PM (permalink)
        0
        post what you have got so far, pls
         
        #4
          ScriptMono

          • Total Posts : 3
          • Scores: 0
          • Reward points : 0
          • Joined: 3/7/2005
          • Location:
          • Status: offline
          Re: createobject("Scripting.filesystemobject") nt Wrk? Monday, March 07, 2005 11:39 PM (permalink)
          0
          Ok find below the code I have to date. I get an error message- activex can't create object... I think it won't let me create this object on the client side, but because I'm onl running on an intranet it can be on client side or server side- it's the same bunch of folders. Maybe I need to access the server and create the filesystemobject here. Any ideas anyone?! Thankyou!

          <SCRIPT language=vbscript event=onclick for=btAttach>
          <!--

          ' a = the filename value
          dim fso
          dim a, fldr, filenme
          dim rs
          a = FormAttach.inputAttach.value
          'if no folder with ampno then create one in default directory
          cmd = "SELECT * FROM [tblOptions]"
          set rs = MSODSC.Connection.Execute (cmd)
          rs.movefirst

          fldr = rs.fields("InstallPath") & "AttachedFiles\" & cstr(txtampid.value ) & "\"
          msgbox "1"
          Set fso = CreateObject("Scripting.FileSystemObject")

          msgbox "2"
          If (fso.FolderExists(fldr)) Then

          Else
          Set fso1 = CreateObject("Scripting.FileSystemObject")
          msgbox fldr
          fso1.CreateFolder(fldr)
          End If

          'get file name of the file that has been passed
          filenme = GetFileNameOnly(a)

          'if fso.fileexists(



          -->
          </SCRIPT>
           
          #5
            token

            • Total Posts : 1917
            • Scores: 0
            • Reward points : 0
            • Joined: 1/14/2005
            • Location:
            • Status: offline
            Re: createobject("Scripting.filesystemobject") nt Wrk? Tuesday, March 08, 2005 9:12 AM (permalink)
            0
            Lower the security settings for ActiveX ?

             
            #6

              Online Bookmarks Sharing: Share/Bookmark

              Jump to:

              Current active users

              There are 0 members and 1 guests.

              Icon Legend and Permission

              • New Messages
              • No New Messages
              • Hot Topic w/ New Messages
              • Hot Topic w/o New Messages
              • Locked w/ New Messages
              • Locked w/o New Messages
              • Read Message
              • Post New Thread
              • Reply to message
              • Post New Poll
              • Submit Vote
              • Post reward post
              • Delete my own posts
              • Delete my own threads
              • Rate post

              2000-2012 ASPPlayground.NET Forum Version 3.9