CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: File Directory

  1. #1
    Guest

    File Directory

    How do I get the directory of a file that is not in the current directory?


  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: File Directory

    Where are you getting the filename from (what function)? This will help us decide how to get the full path.



    --
    Jason Teagle
    [email protected]

  3. #3
    Guest

    Re: File Directory

    if you don't know where the file is you will have a problem since a file name on it self isn't unique, only the full path of the file is unique.
    if you know where te file stands you can do the following
    getcurrentdirectory, to save the current path
    setcurrentdirectory to switch to the directory where the file is
    add the currentdirectory and the filename together to make the full path
    setcurrent directory to the directory you saved


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured