mkdir
Make new folder
Syntax
Description
mkdir creates
the folder folderNamefolderName. If folderName exists, MATLAB® issues
a warning. If the operation is not successful, mkdir throws
an error to the Command Window.
mkdir
creates parentFolder folderNamefolderName 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
mkdirto create folders in remote locations. To write to a remote location,folderNameorparentNamemust contain the full path of the file specified as a uniform resource locator (URL) of the form:schema_name://path_to_file/folderNameor
schema_name://path_to_file/parentNameIt is also valid to use one or three "slash" (
/) characters betweenschema_nameandpath_to_file. For example:schema_name:/path_to_file/folderNameor
schema_name:///path_to_file/parentNameBased on your remote location,
schema_namecan be one of the values in this table.File System schema_nameAmazon S3™ s3Windows Azure® Blob Storage wasb,wasbsHDFS™ hdfsIf the file system being used does not support empty folders then attempting to use
mkdirwith that service will throw an error. For more information, see Work with Remote Data.