Md Obydullah Howdy, I am Md Obydullah. I love to write the article which may help others. It's my passion.

Windows Copy All Folder Names Without Copying Files

Published on July 9, 2019 31 sec read

Sometimes we need to copy folder names only. In this tutorial, I’m going to share an idea to copy all folder names only without copying files. I’ve faced this issue and found a simple solution.

The Solution

Open command prompt (Windows+R, then type ‘cmd’ and hit enter) and navigate to the drive or directory. I’m going to copy all folder names from a directory (project) which is located in my D drive.

cd /d D:\project

Now, I’m in the project folder. In this directory, there are some files too. I want to take the folder names only. To do this, let’s run this command:

ls -d */ | cut -f1 -d'/'

Now we need to copy the names from the console.

If you want to display all folder and file names line by line, you can use this command:

ls -a | sort

Thank you. 🙂

You're welcome to suggest any article to write!

Md Obydullah Howdy, I am Md Obydullah. I love to write the article which may help others. It's my passion.

Leave a Reply

Your email address will not be published. Required fields are marked *