Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
make folder with C
Name: Wiliam Date: January 11, 2002 at 09:54:59 Pacific
Comment:
how can i make a folder with c language. I try this code but didn't work. #include #include main() { char *command = "mkdir test";
system(command);
return 0; } but unfortunately no folder was found. plz help me. I'm using CodeWarrior, win 2000 pro thanks
Name: atom Date: January 11, 2002 at 16:20:41 Pacific
Reply:
look at the documentation for mkdir... that function will create directorys
0
Response Number 2
Name: Giuseppe Date: January 12, 2002 at 01:57:53 Pacific
Reply:
Perhaps the problem isn't in your code but in the Operative System you're using. When you call void system(char *command); C (or C++) lets OS to execute char *command. So if you do not use Dos (or Windows) probably your code will not work. You have only to replace "mkdir" with the command to create a forlder of your OS. The command must be the one you type on command line to create a folder. I've tryed your code on Windows 98 and it works.
Let me know when you solve the problem.
Bye
0
Response Number 3
Name: Wiliam Date: January 12, 2002 at 08:13:17 Pacific
Reply:
hello; I'm using win 2000 pro and the compiler is CodeWarrior. but i have no result yet I included the stdio.h and stdlib.h no resulllllllllllllllllllllllt. plz help.
0
Response Number 4
Name: helge Date: January 13, 2002 at 04:53:44 Pacific
Reply:
cygwin is a unix environment available free for windows. Look at sources.redhat.com and select cygwin and download the setup.exe file and follow the instruction. The your first C program will work without the windows struggles. Else install any Linux distributions such as redhat, debian, slackware or mandrake... (type www..org, ie www.mandrake.org) Then you have full development environment without the windows struggles!
Summary: i have 2 questions regarding files in C++. the first, how can you make folders, and how can you delete files and folders. this is for a console application. ...
Summary: I am writing a program that requires a subroutine to be able open Folders or directories. The objective is to input a folder pathway have the program open the directory read the names of the files fro...