create directory

To the point,
What is the code to create a directory?
smile34Asked:
Who is Participating?
 
makerpCommented:
mkdir makes a dir, this works in NT and UNIX

mkdir("new_dir",777);
0
 
ozoCommented:
perldoc -f mkdir
    mkdir FILENAME,MODE
            Creates the directory specified by FILENAME, with
            permissions specified by MODE (as modified by umask). If
            it succeeds it returns TRUE, otherwise it returns FALSE
            and sets `$!' (errno).
0
 
makerpCommented:
sorry ozo, didnt see your post
0
 
ozoCommented:
777 == 01411, you may have meant 0777
0
 
smile34Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.