Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject and 2010

Status
Not open for further replies.

dBjason

Programmer
Mar 25, 2005
355
US
Now this is just killing me... I haven't programmed in VB for a while. Was pretty good with 6 or so I thought...

I'm trying to access and use the FileSystemObject in a module in VB (using Visual Studio 2010). I added Microsoft Scripting Runtime in the project references.

Now you'd think I'd be able to declare like this:
Dim fso As FileSystemObject

But no, the class is nonexistent. Not even there.

Nor can I do this:
Dim fld As Folder

Apparently they've made some rather large changes since I last developed..

This really stinks because I kinda need to do both of these things. Google and the like have produced nothing. Seems I can't find any help online, what turns up is for .NET only -- which I can't use on this little project.

What the heck happened??? How can I manipulate/modify/enumerate directories and files? Did they scrap the FileSystemObject altogether??? What else can I use to iterate files and directories?

Thanks in advance!
-Jason
 
>.NET ... which I can't use on this little project

Erm ... the VB in Visual Studio 2010 is VB.NET, so yes you can use .NET. In fact, you more-or-less have to.

And the tools for playing with files and folders (back to being called directories) are much more powerful and flexible than the FileSystemObject ... just have a look at the System.IO namespace.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top