Solved

FileSystemObject

Posted on 2001-08-04
6
132 Views
Last Modified: 2010-05-02
I'm new to VB.  I've been writing VBScripting for a few however.  My question is what component do I add to my project to be able to use the FileSystemObject?
0
Comment
Question by:raizon
  • 4
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
JonFish85 earned 75 total points
ID: 6352713
Project -> References -> Microsoft Scripting Runtime


hope this helps!
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352714
Then use something like this:

Dim fs As New FileSystemObject

'code here

set fs = nothing
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352717
alternativly you can go:

Dim fs As Object

Set fs = CreateObject("Scripting.FileSystemObject")
'Stuff
Set fs = Nothing

but this is using "late binding" which is slower... Microsoft suggests using early binding, as in example above...
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 5

Author Comment

by:raizon
ID: 6352720
Great.  Thats exactly what I needed.  I had the early binding set.  Which I'm glad that you posted that cause it confirmed that I was doing it correctly.

Thanks again
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352724
glad to be of service!
0
 
LVL 5

Author Comment

by:raizon
ID: 6352726
Good luck on your MCSD.  

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question