next up previous
Next: Requesting Server Information: The Up: The FTP Protocol Previous: Uploading/Storing files: STOR, APPE

Directory Commands and Deleting Files: MKD , RMD , DELE , RNFR , and RNTO commands

The MKD command -- Make Directory

A MKD request asks the server to create a new directory. The MKD parameter is an encoded pathname specifying the directory.

If the server accepts MKD (required code 257), its response includes the pathname of the directory, in the same format used for responses to PWD.

A typical server accepts MKD with code 250 if the directory was successfully created, or rejects MKD with code 550 if the creation failed.

The RMD command -- Remove Directory

An RMD request asks the server to remove a directory. The RMD parameter is an encoded pathname specifying the directory.

A typical server accepts RMD with code 250 if the directory was successfully removed, or rejects RMD with code 550 if the removal failed.

RFC 1123 requires that the server treat XRMD as a synonym for RMD .

The DELE command -- Delete a file A DELE request asks the server to remove a regular file. The DELE parameter is an encoded pathname specifying the file.

A typical server accepts DELE with code 250 if the file was successfully removed, or rejects DELE with code 450 or 550 if the removal failed.

The RNFR command -- Rename a file

A RNFR request asks the server to begin renaming a file. The RNFR parameter is an encoded pathname specifying the file.

A typical server accepts RNFR with code 350 if the file exists, or rejects RNFR with code 450 or 550 otherwise.

The RNTO command -- Finsih Renaming a file

A RNTO request asks the server to finish renaming a file. The RNTO parameter is an encoded pathname specifying the new location of the file. RNTO must come immediately after RNFR ; otherwise the server may reject RNTO with code 503.

A typical server accepts RNTO with code 250 if the file was renamed successfully, or rejects RNTO with code 550 or 553 otherwise.


next up previous
Next: Requesting Server Information: The Up: The FTP Protocol Previous: Uploading/Storing files: STOR, APPE
Dave Marshall
9/28/2001