Syntax:

MKDIR(directory)

  • directory: remote directory to be created.

Return value:

MKDIR will return “OK” as soon as the remote directory has been created successfully.
If the operation fails it will return an error code. You may retrieve the return value and execute various operations depending on this value. See Error handling.

See also:

LOCALMKDIR
CHDIR
CWDIR
RMDIR

Example:

# Connect to server
OPENHOST("ftp.myhost.com","myuser","mypassword")
 
# Create mydir
MKDIR("mydir")
 
# Go to mydir
CHDIR("mydir")
 
# Get the current directory
$a=CWDIR()
 
# The print command should print mydir
PRINT($a)
 
# Close the connection
CLOSEHOST