banner_ad

Make A Directory List With The Command Prompt In Seconds

Others 1228 views 1 replies

Make A Directory List With The Command Prompt In Seconds 
 
 
Did you ever want to send a list of all the music in your computer to someone else? How about the names of all the files in a specific directory - like My Documents? This can be easily done with the command prompt which is built into Windows. Although there are many programs out there that are able to create directory lists, using the command prompt is quick, easy, and there is no need to install a new application.

More…
Running and Navigating in the Command Prompt

To run the command prompt, click on Start->Run and type cmd.

Notice that you are immediately placed in C:\Documents and Settings\[user].
Cmd.GIF

Navigate to the folder that you want to create a list of all files in by using the 'cd' command:

Simply type "cd\folder1\folder2\…". So if you want to get to the folder c:\MyFiles\Music you would type:

Cd\myfiles\music

Cmd2.GIF
Now, just type this command:

Dir /on /b /s >list.txt

The file list.txt will be created in the directory (in this case c:\MyFiles\Music\list.txt) and will include all the files and sub-directories that are included in the current folder. If you only want a list of the files and folders in the current folder without its sub-directories, remove the /s, to make it:

Dir /on /b >list.txt

The /on orders the lists by alphabetical name, the /b makes it only list the filename, and the /s includes subdirectories files in the list.

Of course, you can change the text file to anything you want by changing list.txt to anything.txt.

This is how the text file will look like:
List.GIF

You can modify this file in seconds and make it look exactly like you want it (like removing the c:\MyFiles\Music part) with your favorite text editor and the Find and Replace feature. This can be used to make lists of everything on the computer - music, documents, pictures and programs.

This whole process takes less than 30 seconds and is vital at times. Especially before a reformat.

Replies (1)
nice thanx for sharing


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
ARTICLESHIP 09 June 2026
Article Trainee

Numbertree LLP

Mumbai

CA Inter

View Details
Company
22 May 2026
Sr. Financial Analyst - Consolidation

Search Synergy

Mumbai

CA

View Details
Company
19 May 2026
Article, CA & Paid Assistant Positions

Aggarwal Sarawagi and Co

New Delhi

CA

View Details
Company
29 May 2026
Company Secretary - Part time

Shaswat initial support private limited

Ahmedabad

CS

View Details
Company
ARTICLESHIP 31 May 2026
Article Assistant

KPRS And Associates

New Delhi

CA Inter

View Details
Company
24 May 2026
Accounts & Tax Executive

PARAS KHURANA AND CO

New Delhi

B.Com

View Details
Company
18 May 2026
MIS Executive

Primarc Pecan Retail Limited

Mumbai

B.Com

View Details
Company
Featured 27 May 2026
Lead Conversion Executive / Sales Closing Executive

SMJ global advisors pvt ltd

New Delhi

B.Com

View Details