How do you create a file system object in vb srcipt or vb 6.0


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How do you create a file system object in vb srcipt or vb 6.0

  1. #1
    Michael Kascher Guest

    How do you create a file system object in vb srcipt or vb 6.0

    How do you create a file system object in vb srcipt or vb 6.0. What is the
    code






    Michael Kascher
    Advanced Distribution Solutions, Inc.
    Email: mikek@adsionline.com
    PH: 847-619-7447
    FX: 847-619-7535




  2. #2
    Join Date
    Aug 2006
    Location
    Sisak, Croatia
    Posts
    21

    Smile Create object

    Hi!

    Here it is:

    Dim fso as Object

    Set fso = CreateObject("Scripting.FileSystemObject")
    Regards,
    Dida

  3. #3
    Join Date
    Aug 2005
    Posts
    51
    Alternatively, you could use:

    Code:
        Dim fso As FileSystemObject
    
        Set fso = New FileSystemObject
    Either way, your Project needs a reference to 'Microsoft Scripting Runtime' in order to use the file system object.

  4. #4
    Join Date
    Dec 2004
    Location
    Atlanta, Ga.
    Posts
    25
    Quote Originally Posted by doofusboy
    Either way, your Project needs a reference to 'Microsoft Scripting Runtime' in order to use the file system object.
    The project does not need to reference the scripting runtime to create an instance as described in the first reply...

    VB6 Code:
    Code:
    Dim fso as Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    VB Script Code: (only the declaration needs to be changed..)
    Code:
    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center