• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
August 09, 2022 |7.7K Views
C/C++ Program to Create Folder and Directory
Description
Discussion

In this video, we will write a C++/C program for creating a folder and directory. 

A directory or folder is a location on a disk used for storing data related to particular files. You can sort your files into groups and place each related group into its own directory. This means you do not have to search a complete disk to find one type of file. 

In C++/C this task can be accomplished by using the mkdir() function. Directories are created with this function.

The mkdir() function creates a new, empty directory with the name filename. 

Method: 
// mkdir() function 
int mkdir (char *filename) 

After execution of the program if the return value of 0 then it indicates successful completion, otherwise -1 indicates failure.

Create Directory or Folder with C/C++ Program:
https://www.geeksforgeeks.org/create-directoryfolder-cc-program/

Read More