Home > Language Reference > FTP Functions > FTPMkDir

FTPMkDir

The FTPMkDir function creates a folder on the FTP server.

Syntax

ret=FTPMkDir(<FTP_foldername>)

Parameters

<FTP_foldername>, string, name of the folder to create.

Return value

Ret, optional numeric return value. If the function succeeds creating the folder within 30 seconds (this default value can be changed using #FTPTimeout), the function returns 0. If the function fails, the return value is a nonzero negative value (see FTP Functions Error Codes).

See also

FTPRmDir
FTPExistDir

Example

FtpConnect("www.my_site.com","ftp","MX/WH05CZE3h") ' connection to the FTP server www.my_site.com (fake credentials!)
FtpMkDir("/upgrades/todelete") ' creates the subfolder todelete under the upgrades folder
FtpChDir("/upgrades/todelete") ' change the current folder to /upgrades/todelete
FtpCurrentDir(var$) ' var$ contains /upgrades/todelete
msgbox(var$)
FtpDisconnect() ' Terminates the FTP connection