|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Determine what current drive letter is?I need to find out what the current drive letter that is being used for
the application. Because i want to copy/move files to a fixed path, and don't want to hard code in "C:\" when it's not certain that the drive exists. Thanks for the help! John johnb41 wrote:
> I need to find out what the current drive letter that is being used for By "being used by the application" do you mean the same drive the EXE> the application. Because i want to copy/move files to a fixed path, > and don't want to hard code in "C:\" when it's not certain that the > drive exists. > > Thanks for the help! > John was loaded from? If so, it can be gleaned from the Application.StartupPath property. "johnb41" <jsbuchm***@gmail.com> schrieb: \\\>I need to find out what the current drive letter that is being used for > the application. Because i want to copy/move files to a fixed path, > and don't want to hard code in "C:\" when it's not certain that the > drive exists. Imports System.IO .... MsgBox(Path.GetPathRoot(My.Application.Info.DirectoryPath)) /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Wow, thanks guys for the quick answers. Both answers seem to do the
trick. It's frustrating that "my.application.bla bla" has different properties/methods than simply "application.bla bla". Some things are the same, but with different names, and other things exist in one, but not the other. :( Thanks again! John
Regular Expressions .NET
Issue with VB6 using a .NET DLL on one PC with Windows 2000 Server how to round number to custom step (0.25, 20, 100...) Bug in Radio Button (or weird feature) audio functions in Winmm.dll Compilation in dot NET Quick SQLclient Data Access ASPX / VB .NET Combine a SQL connection with a QDBC connection Shared Compression for VB.NET and PHP Sum of a DataGridView column |
|||||||||||||||||||||||