Thread: mkdir() Directory already exists?

  1. #1
    1ST » R. vd Kooij
    Join Date
    Mar 2006

    mkdir() Directory already exists?


    I'm using mkdir() to create new directories. I ask the user for a directory name, but it's very important to check whether the directory already exists, because the data in it shouldn't be overwritten.
    Any idea how to do this?

    Thanks in advance,

    OS: Windows XP
    Compiler: Dev-C++

  2. #2
    Registered User
    Join Date
    Aug 2005
    _stat() or stat() will probably tell you whether a directory already exists or not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  3. Replies: 1
    Last Post: 12-10-2007, 06:26 PM
  4. MFC: How do you check if a directory exists before creating?
    By BrianK in forum Windows Programming
    Replies: 5
    Last Post: 07-06-2004, 01:09 AM
  5. Replies: 6
    Last Post: 07-30-2003, 03:08 AM