FTP 101 – Part 8: Navigating with mkdir and cd
Published {$created} by Carsten Blum
When using FTP from the command line, knowing how to move around and create folders is essential.
Two basic commands help you do just that: cd and mkdir.
If you don't have an FTP account already, you can create an account with ftpGrid.
cd – Change directory on the server
Use the cd command to switch to another folder on the remote server.
Example:
cd /uploads
This moves you into the /uploads directory on the FTP server.
If the folder doesn’t exist, you’ll see an error like:
550 Failed to change directory.
mkdir – Create a new folder on the server
To make a new directory, use mkdir (short for "make directory").
Example:
mkdir reports
This creates a new folder called reports in the current remote directory.
To create a nested folder:
mkdir backups/2025
Some FTP servers allow this directly, others require you to create one level at a time.
Putting it together
A typical session might look like:
cd /uploads
mkdir invoices
cd invoices
put january.pdf
This uploads january.pdf into /uploads/invoices.
Summary
Task | Command |
---|---|
Change remote folder | cd <folder> |
Create new remote folder | mkdir <name> |
Mastering these two simple commands gives you full control of where your files end up on the server. ftpGrid fully supports mkdir and deep folder hierarchies – including with SFTP, FTPS, and classic FTP.