Use the Mkdir to create a new folder or subfolder on the remote computer.
mkdir path
Where:
path | is 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:
550 | This 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. |
Examples:
mkdir \newfolder
mkdir "sub folder"
mkdir folder\subfolder
Sample Script:
* Sample script using the "mkdir" command
* Create the \folder\subfolder folder
:Start
mkdir \folder\subfolder
if 550 FolderNotCreated
exit 0
:FolderNotCreated
mkdir \folder
if 550 Exit550
goto Start
:Exit550
exit 550