Thread: Chdir()

  1. #1
    Registered User
    Join Date
    Oct 2004



    I start to give an example:

    I'am running the program in the directorie("/home/big/work2")

    Then in the middle of the program i change the directorie:
    I've used chdir("FINE");
    And then i want in other part of the program to return to the previous directorie:

    How can i return to the previous directorie without writing the all PATH:/home/big/work2

    Like doing "c.."

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    How about "cwd()" to get the current directory before you chdir(), so you can chdir() back again when you're done

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with chdir()
    By ammochck21 in forum C Programming
    Replies: 8
    Last Post: 09-11-2008, 09:26 PM
  2. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  3. Replies: 12
    Last Post: 04-25-2007, 02:48 PM
  4. how to do...
    By kirmelyte in forum C Programming
    Replies: 1
    Last Post: 05-17-2006, 12:59 AM
  5. chdir()
    By YankeePride13 in forum C++ Programming
    Replies: 3
    Last Post: 11-18-2005, 03:49 PM