Windows Copy All Folder Names Without Copying Files
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.
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. ?
Preview may take a few seconds to load.
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Bold **double asterisks**
Three back ticks and then enter your code blocks here.
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
> type a greater than sign and start typing your quote.
You can add links by adding text inside of  and the link inside of (), like so:
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of , and the image URL inside of (), like so:
To add a divider you can add three dashes or three asterisks:
--- or ***