Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need some code on Directory 's

ImDaFrEaKImDaFrEaK Member Posts: 29
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

  • FallenFallen Member Posts: 32
    : 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 :)
    :

    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.

  • ImDaFrEaKImDaFrEaK Member Posts: 29
    thanx.. :) that helps me out really... i didn't know that. Does that work the same when making files and reading them in? I would still like to learn more about the directory features if anyone can help but your answer really did fix my problem. Thanx
  • FallenFallen Member Posts: 32
    : thanx.. :) that helps me out really... i didn't know that. Does that work the same when making files and reading them in? I would still like to learn more about the directory features if anyone can help but your answer really did fix my problem. Thanx
    :

    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





  • ImDaFrEaKImDaFrEaK Member Posts: 29
    Thanx 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.
    [email protected]

  • Shawn CarterShawn Carter Member Posts: 0

    _______ { http://forcoder.org } free video tutorials and ebooks about | Swift C++ Perl C C# Go MATLAB Objective-C Scratch PHP Visual Basic .NET PL/SQL JavaScript Python R Assembly Java Visual Basic Ruby Delphi Erlang COBOL Apex Scheme Kotlin SAS Julia LabVIEW Rust VBScript Ada Fortran ML F# Lisp Dart D Prolog Crystal Clojure Transact-SQL FoxPro ABAP Hack Awk Alice Lua Logo Scala Bash | ___

Sign In or Register to comment.