Home / Web servers / How to Make an Entire Directory Path

How to Make an Entire Directory Path

File folder iconQuestion: How do I create an entire path of directories?

Answer: On a desktop computer, anytime you want to create a folder, you have to go through a series of clicks, type in the name, and press Enter. If you want to create a series of nested folders, you have to go through that process several times for each one. That is time consuming and not something you want to have to do on a server.

There are times when creating an entire path of directories may be very useful. For example, if you have a website photo gallery and want to setup the album directories, you will want to be able to quickly create those paths. You can do this easily from the command line and do not need to repeat steps.

On a Linux server, to create an entire path of directories, enter from the command line:

mkdir -p photos/2010/albums/zoo

On a Windows server, just reverse the slashes:

mkdir photos\2010\albums\zoo

This will automatically create the photos, 2010, albums, and zoo directories. With one quick command, you saved yourself four steps.

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …

Powered by Namesco
© Copyright InternetBlog.Org.Uk 2022, All Rights Reserved