FTPMkdir

Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO All

Syntax

FTPMkdir (socket,dirnameReturns status

Description

Note: The flag is set according to whether Omnis was able to make a call to this external command.

This Web command is multi-threaded,allowing another thread to execute in the multi-threaded server while it runs. Note that the same socket cannot safely be used concurrently by more than one thread.

FTPMkdir creates a new directory on the FTP server.

Socket is an Omnis Long Integer field containing a socket opened to an FTP server using FTPConnect.

DirName is an Omnis Character field containing the pathname of the new directory to create on the server.

Note: The name of the new directory must follow the convention and file-naming rules of the remote system. Not all users will have permissions to create new directories on arbitrary directories on the remote system. Default file-access permissions apply to the new directory.

Status is an Omnis Long Integer field which receives the result of executing the command. Possible error codes are listed in the Web Command Error Codes Appendix.

Example

; create a new directory called myNewDirectory in the directory Test
Calculate lDirName as '/Test/myNewDirectory'
FTPMkdir (iFTPSocket,lDirName) Returns lErrCode
If lErrCode
  FTPGetLastStatus (iServerReplyText) Returns lErrCode
  OK message FTP Error {[con("Error creating directory",lDirName,kCr,"Details follow: ",kCr,iServerReplyText)]}
End If