#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    5
    Rep Power
    0

    Directory creator


    // libraries
    #include<stdio.h>
    #include<stdlib.h>
    #include<io.h> // libraries for create a directory

    int main(int argc, char** argv[]){ //arguments that the command line receives when the program and executed

    char directory[1001];


    printf("Write the directory name: ");
    gets(directory);

    int a=mkdir(directory); // function for create a directory

    if(!a){
    /*
    or if(a==0)

    the mkdir() function returns 0 value when is executed correctly
    */
    printf("Directory created sucessfully . . . .\n");

    }else{
    printf("Error . . .\n");
    }
    getch();

    }
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    India
    Posts
    95
    Rep Power
    4
    ask your problem in English language.
    Thanks.
  4. #3
  5. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    So what's the question?

IMN logo majestic logo threadwatch logo seochat tools logo