• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

techtips

Technical stuff!

  • Home
  • WindowsOS
  • Offline Installer
  • Web links

Copy folder sub directories / files name to a notepad

April 25, 2017 by admin Leave a Comment

There are situations we need to get all the sub folders and files details to a note pad, to achieve this we can use windows command prompt

  • Navigate to the folder that you want to create a list for

E.g – I want to get the list of folders / files under my C:\Root folder

  • Hold SHIFT + Right click and select “Open command window here”
  • Enter following command

C:\Root>dir /a /-p /o:gen >list.txt

 

  • Now navigate the Root folder and find a new text file created as list.txt, open and get the all the sub folders / files details

——————————————————

Volume in drive C is Windows
Volume Serial Number is 80D8-BE7F

Directory of C:\Root

04/25/2017 06:42 PM <DIR>   .
04/25/2017 06:42 PM <DIR>   ..
04/25/2017 06:37 PM <DIR>   Adv
04/25/2017 06:37 PM <DIR>  Baisc
04/25/2017 06:37 PM           0 MyDet.docx
04/25/2017 06:37 PM           0 Cmd1.txt
04/25/2017 06:42 PM           0 list.txt
04/25/2017 06:37 PM           0 test.txt
4 File(s) 0 bytes
4 Dir(s) 301,075,058,688 bytes free

—————————————————

If you want only list of files (no extra information), then open cmd and type

C:\Root>dir /a /b /-p /o:gen >list.txt

——————————————————

Volume in drive C is Windows
Volume Serial Number is 80D8-BE7F

Directory of C:\Root

Adv
Baisc
MyDet.docx
Cmd1.txt
list.txt
test.txt

————————-

NOTE:

“dir” command will list all the folders and files under specified folder.

“>” operator will redirect the result of command to the specified text file

open cmd and enter dir /? to see all available options and their explanation.

Filed Under: WindowsOS

Reader Interactions

Comments

  1. google seo tool free backlink checker says

    November 29, 2025 at 1:46 am

    Your comment is awaiting moderation.

    Yet another issue is really that video gaming has become one of the all-time biggest forms of excitement for people of all ages. Kids engage in video games, and also adults do, too. The actual XBox 360 is one of the favorite gaming systems for folks who love to have hundreds of games available to them, along with who like to play live with others all over the world. Thanks for sharing your opinions.

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Categories

Recents

  • Copy file path with slashes in MacOS Mojave instead of triangle
  • Open hidden files in mac text editor
  • How to manage and open chrome browser extensions or plugins
  • Create an executable command file in MAC OS
  • Backup windows environmental variables

Menu

open all | close all
  • Contact Us
    • About Us
  • Download [official] portable notepad++
    • Find IP address on windows machine
      • Different ways to open remote desktop from windows
      • How to restart remote machine/server in windows
      • Place chrome’s address bar to bottom of screen

Footer

Design

With an emphasis on typography, white space, and mobile-optimized design, your website will look absolutely breathtaking.

Learn more about design.

Content

Our team will teach you the art of writing audience-focused content that will help you achieve the success you truly deserve.

Learn more about content.

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in