I need some example code on using...
directory
getcurrentdirectory
setcurrentdirectory
My application when installed onto another computer needs to look for an mp3 file that will be installed with it and I don't know how to tell the computer to look at the directory the application is running from. THe user may not install the program in the same directory as I and that would cause my program not to find the mp3 if I gave it a specific directory. Basically I need to know how to know which dirdctory the mp3 will be in, being that it will be installed in the same directory as the program. thanx so much for help
Comments
: directory
: getcurrentdirectory
: setcurrentdirectory
: My application when installed onto another computer needs to look for an mp3 file that will be installed with it and I don't know how to tell the computer to look at the directory the application is running from. THe user may not install the program in the same directory as I and that would cause my program not to find the mp3 if I gave it a specific directory. Basically I need to know how to know which dirdctory the mp3 will be in, being that it will be installed in the same directory as the program. thanx so much for help
:
If you just call the mp3, the program will automatically look for it in the current folder (the one the program is running in), so you don`t need to get the program to look for anything.
:
No worries, it should work with all files.
Here are a few things that might help.
Application Class (YOUR program being the application in question)
Public Shared Properties:
AllowQuit
CompanyName
ExecutablePath
ProductName
ProductVersion
those are some of the properties, remember those are GET properties, you cannot as far as i know, set those at run time, you can only retreive the value. There are also alot more to the application path.
Directory Class (System.IO)
Public Shared Methods
CreateDirectory ( Directory.CreateDirectory("C:
ewdir")
Delete
Exists
GetCreationTime
GetCreationDate
GetDirectories
Move
Once again there are alot more than these few.
File Class (System.IO)
Public Shared Methods
AppendText
Copy
Create
CreateText
Delete
Exists
Move
Open
Like the others these are just a few.
If you need a hand sorting though all this stuff, let me know what you exactly need to do
Hope that helps
-Fallen
I have been able to use directory coding very well now and if anyone else is reading this and would like help or explanation feel free also to e-mail me as well like Fallen offered his help I will do the same.
KeeblerShadowHaje@yahoo.com