• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

FileSystemObject

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
raizon
Asked:
raizon
  • 4
  • 2
1 Solution
 
JonFish85Commented:
Project -> References -> Microsoft Scripting Runtime


hope this helps!
0
 
JonFish85Commented:
Then use something like this:

Dim fs As New FileSystemObject

'code here

set fs = nothing
0
 
JonFish85Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
raizonAuthor Commented:
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
 
JonFish85Commented:
glad to be of service!
0
 
raizonAuthor Commented:
Good luck on your MCSD.  

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now