0

Not sure if this is the right forum for such a question, but hopefully someone has an answer or can direct me to the right place.

I have several folders on my hard drive with thousands of files within them. I would like to copy the names of these files into a text file (eventually take into Excel so that I may sort, categorize, etc). Is there a free utility that will allow me to do this?

My other thought is to do this within DOS, but I am unsure of what the commands would be.

TIA,
~Kar

3
Contributors
6
Replies
7
Views
11 Years
Discussion Span
Last Post by Nick Evan
0

In the command prompt (ie DOS), navigate to the directory in question and type:

dir > [filepath and filename]

.
EG, to output the contents of my C drive to c:\temp\test.txt, I go to the c:> prompt and type:

dir > c:\temp\test.txt
0

In the command prompt (ie DOS), navigate to the directory in question and type:

dir > [filepath and filename]

.
EG, to output the contents of my C drive to c:\temp\test.txt, I go to the c:> prompt and type:

dir > c:\temp\test.txt

so do I type "dir >" ? do I have to create that txt file first so the copy has somewhere to go?

0

The redirection operator ( the > symbol) creates the file specified after it. More info on Redirection and Pipes in DOS here.

0

I can't seem to "navigate" to the folder. It's the My Music folder within My Documents. When I go into the cmd screen, DOS is already prompting with: C:\Documents and Settings\Amy>

My folder path of which I want a list of the files is: C:\Documents and Settings\Amy\My Documents\My Music

0

Use the DOS commands 'cd' or 'chdir' to change the current directory.
Use "dir /x" to find the 8.3 format name of each folder/file first. It isn't necessary, but it is useful.

EG:

C:\Documents and Settings\Amy>dir /x
...[OTHER FOLDERS]
08/11/2006  04:49 PM    <DIR>          MYDOCU~1     My Documents
...[OTHER FOLDERS]
C:\Documents and Settings\Amy>cd mydocu~1

C:\Documents and Settings\Amy\mydocu~1>dir /x

And so on.

Edited by Dani: Formatting fixed

0

I have several folders on my hard drive with thousands of files within them.

In case you want to search the sub-dirs, you shoul use the /s switch with dir.
Example:

dir /b /s > database.txt
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.