Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What is .Net substitute for Scripting.FileSystemObject's GetFile function?

Posted on 2010-08-27
5
Medium Priority
?
1,290 Views
Last Modified: 2013-11-27
I'm migrating from VB6 to VB 2010 .Net and having a problem with what to do with my old Scripting.FileSystemObject functions.

Below is some VB6 code. What namespace do I need to use and specifically how would  do thisI:
Dim fs As New Scripting.FileSystemObject
Dim FileCurrent as File
Set fileCurrent = fs.GetFile(App.Path & "\SomeFile.exe")
0
Comment
Question by:BruceHSanford
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Expert Comment

by:Zhaolai
ID: 33546010
The closet one is FileInfo, like this:

        Dim oInfo As System.IO.FileInfo = My.Computer.FileSystem.GetFileInfo(My.Application.Info.DirectoryPath & "\SomeFile.exe")

0
 
LVL 16

Expert Comment

by:13598
ID: 33546303
0
 
LVL 16

Accepted Solution

by:
13598 earned 2000 total points
ID: 33546318
0
 

Author Closing Comment

by:BruceHSanford
ID: 33558677
Thank You Expert!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

661 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