logo Mkdir create a new folder on the remote computer

Return to Introduction     

Use the Mkdir to create a new folder or subfolder on the remote computer.


mkdir path




pathis the name and location of the new folder to be created on the remote computer. The path is relative to the current folder. If path contains a space, it must be enclosed in double quotes.  For example:


mkdir "\sub folder\"



Return Codes:


550This return code can be caused by any of the following:
A file or folder with the same name already exists in the current folder on the remote host.
The specified path to the new folder does not exit on the remote host. For example if the path is "folder/subfolder" you will get this error if "folder" does not exist.
You do not have the appropriate permissions to create a folder on the remote host.                                                                




mkdir \newfolder

mkdir "sub folder"

mkdir folder\subfolder


Sample Script:


* Sample script using the "mkdir" command

* Create the \folder\subfolder folder


mkdir \folder\subfolder

if 550 FolderNotCreated

exit 0


mkdir \folder

if 550 Exit550

goto Start


exit 550