473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

FileSystemObject Vs System.IO.DirectoryInfo

Using the FileSystemObject I can, at runtime find out which drive letter is asigned to the CD Rom Driv

Dim Fso As New Scripting.FileSystemObjec
For Each Drive As Scripting.Drive In Fso.Drive
If Drive.DriveType = Scripting.DriveTypeConst.CDRom The
MsgBox("Your CD Rom drive is: " & Drive.Path
Exit Fo
End I
Nex

But I cannot find a way to get this info out of the System.IO namespac

Dim objDir As System.IO.DirectoryInf
For Each s As String In System.IO.Directory.GetLogicalDrives(
objDir = New System.IO.DirectoryInfo(s
'Cant get the drive type from the DirectoryInfo Object
Nex

I would prefer not to use the FileSystemObject if I can avoid it.
Please could someone point me in the right direction

Ben
Jul 21 '05 #1
0 1320

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Patrick.O.Ige | last post by:
Hi, I want to use FileSystemObject to retrieve file names and directory from a drive and manage it through the web browser!I want to be able to upload file to the server and if possible to delete...
2
by: Luis Esteban Valencia | last post by:
I'm trying to write a little VB.NET script in an ASP.NET web page that will create folders, move files, etc... pretty much everything you can expect to do using the FileSystemObject library. Is...
7
by: abcd | last post by:
from ASP.NET program how can I check the file existance and get properties of a file on a system....do .net use the same FileSystemObject or are there other .NET calls availbe to work equivalent to...
1
by: curtis m. west | last post by:
hi NG sorry for this maybe stupid question: i have this construction: ----->>>> CUT ON <<<<<----- Dim objFso As Object Dim objFolder As Object Dim objFile As Object objFso =...
0
by: Ben Reese | last post by:
Using the FileSystemObject I can, at runtime find out which drive letter is asigned to the CD Rom Driv Dim Fso As New Scripting.FileSystemObjec For Each Drive As Scripting.Drive In Fso.Drive If...
2
by: eric.goforth | last post by:
Hello, I'm using the Filesystemobject in VB.NET 1.1. Is there anyway to filter on the files based on an extension? Something like: Dim fso As New FileSystemObject Dim objFolder As Folder...
2
by: Patrick Bates | last post by:
What are the classes/functions in .Net 2.0 which replace the FileSystemObject? Thanks.
1
by: nygiantswin2005 | last post by:
Hi I am trying to resolve this bug that I have in this application. The code is below. It will generate this Exception System.UnauthorizedAccessException: Access to the path is denied. at...
3
by: Nathan Sokalski | last post by:
I am getting the list of subdirectories from a specified directory using System.IO.Directory.GetDirectories(), and would like to get only subdirectories that are not hidden or system directories. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.