Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-08-27
5
Medium Priority
?
1,393 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
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

886 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