Click here to Skip to main content
15,920,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am usnig C on AIX.
I want to create a directory in some path.
Before creating it, i want to check if it already exist or not.
How can I do these things in C? Please help me out.

Thanks in advance.

I think you should be able to use the _mkdir and _access functions.

Share this answer

Thanks for reply I am using plain C code on AIX.
I had included sys/types.h and sys/stat.h

sprintf(DocDir,"%s/%s",<PATH OF DIR>,"DIRNAME");

But receiving error as,
the text "mkdir" is unexpected.

Please help me out.
Share this answer
Hello I send some code for create new directory
just you add button and set it's click event this code
if (System.IO.Directory.CreateDirectory("C:/Hello").Exists)
         MessageBox.Show("AllReady Available");
         MessageBox.Show("Create Directory");

Hope For Help
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900