mkdir
Make new folder
Syntax
Description
mkdir
creates
the folder folderName
folderName
. If folderName
exists, MATLAB® issues
a warning. If the operation is not successful, mkdir
throws
an error to the Command Window.
mkdir
creates parentFolder
folderName
folderName
in parentFolder
. If
parentFolder
does not exist, MATLAB attempts to create it.
creates the
specified folder and returns a status of status
= mkdir(___)1
if the operation
is successful or if the folder exists. Otherwise, mkdir
returns 0
and does not throw a warning
or error to the Command Window. You can use this syntax with any of the input
argument combinations in the previous syntaxes.
Examples
Input Arguments
Output Arguments
Tips
You can use
mkdir
to create folders in remote locations. To write to a remote location,folderName
orparentName
must contain the full path of the file specified as a uniform resource locator (URL) of the form:schema_name://path_to_file/folderName
or
schema_name://path_to_file/parentName
It is also valid to use one or three "slash" (
/
) characters betweenschema_name
andpath_to_file
. For example:schema_name:/path_to_file/folderName
or
schema_name:///path_to_file/parentName
Based on your remote location,
schema_name
can be one of the values in this table.File System schema_name
Amazon S3™ s3
Windows Azure® Blob Storage wasb
,wasbs
HDFS™ hdfs
If the file system being used does not support empty folders then attempting to use
mkdir
with that service will throw an error. For more information, see Work with Remote Data.