Exforsys
+ Reply to Thread
Results 1 to 2 of 2

creating directories from c program

This is a discussion on creating directories from c program within the C and C++ forums, part of the Programming Talk category; I am reading in data from files in a large set of directories, the data is stored in a structure. ...

  1. #1
    hat123 is offline Junior Member Array
    Join Date
    Jun 2006
    Answers
    6

    Question creating directories from c program

    I am reading in data from files in a large set of directories, the data is stored in a structure. The data must be sorted based on various parameters in the data--which are not known to the user before hand--so that the information can be passed on to another program and a log file can be created. I need the program to create data/output storage directories based on the data sort parameters in which the output from the follow-on program and the log file will be stored. The directories cannot be created by hand, because the program needs to put the path to the directory into the file read by the follow-on program--and the process needs to be "invisible" to the user who likely will know nothing about the original data, where the output directories should be, etc.

    Bottom line: how do I create a directory using a c-program?


  2. #2
    Ralph is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    114
    You can use system calls in C to handle directories namely directory creation. Hope you are using UNIX operating system.The Directory handling functions are present in <unistd.h>.


Latest Article

Network Security Risk Assessment and Measurement

Read More...