Solved

Excel List Of Files in WIndows Explorer FOlder

Posted on 2013-06-20
13
364 Views
Last Modified: 2013-06-21
I have a folder in Windows that has over 100 files in it.  I would like to get a text or Excel listing of the file names.  How can I extract the file names in a list?  Thanks.  - Tom
0
Comment
Question by:tomfarrar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
13 Comments
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264496
Hi Tom,
Open a command prompt (let me know if you don't know how to do that), go to the folder of interest (also let me know if you don't know how) and type:

dir *.*>filelist.txt

Hit Enter. This will give you a lot of info about the files. If you'd like just the file names and types, give it the /b option (stands for "bare"):

dir *.*>filelistbare.txt /b

Regards, Joe
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264537
Tom,
Just in case you need instructions on how to open a command prompt and navigate to the folder, here they are:

Start menu
All Programs
Accessories
Command Prompt

You'll see a window that looks like this:
command promptIf your folder of interest is on the C drive, great; if not, type the drive letter followed by a colon and hit the Enter key. For example, if the folder is on the D drive, type

D:

in the command prompt window and hit Enter.

Now type this in the command prompt window and hit Enter:

cd \foldername

where foldername is the name of the folder you want the list for. You should now see in the command prompt window the drive letter and the folder of interest, such as this:
command prompt with drive and folderNow you're ready to do:

dir *.*>filelist.txt

or

dir *.*>filelistbare.txt /b

(followed by the Enter key)

The resulting text file with a list of your 100+ file names will go into the same folder. You may hit the red X in the upper right of the command prompt window to close it. Regards, Joe
0
 
LVL 7

Author Comment

by:tomfarrar
ID: 39264539
so here is what I did:

Went to Windows Explorer
Selected the folder I want a list of files from
Held down the shift key, and right-clicked the folder; selected "Open Command Window Here"
With the window open, and showing my folder path "like "MyPath"> follwed by a blinking curser
Typed: filelist.txt
Said command not recognized
Typed: filelistbare.txt/b
Said command not recognized

What am I doing wrong?  Thanks, Joe.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 7

Author Comment

by:tomfarrar
ID: 39264555
Here is the results of following your instructions, Joe.  Or, a least I think I did.  - TomEE-Doc.docx
0
 
LVL 54

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
ID: 39264577
Tom,
Not just filelist.txt. The command is:

dir *.*>filelist.txt

Likewise,

dir *.*>filelistbare.txt /b

Regards, Joe
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264583
Oh, I just looked at your document...there needs to be a space between dir and *.*
0
 
LVL 7

Author Comment

by:tomfarrar
ID: 39264614
Still not getting there yet.  Thanks for your patience, Joe.  See attachment.
EE-Doc.docx
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264618
You are there! The last three all worked correctly! You now have a file called [filelist.txt] in the folder [Z:\TieOut WIP]. Open up Notepad, browse to that folder, and load the file!
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264632
Of course, the filename for the list can be whatever you want, such as [these_are_my_100_files.txt]. So then the command would be:

dir *.*>these_are_my_100_files.txt

And just put a /b on the end if you want only the bare file names:

dir *.*>these_are_my_100_files.txt /b
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39264753
Tom,
I'm sure the lack of any feedback when you issued the dir command is disconcerting, so I'll explain. The command

dir *.*

means to do a directory listing (dir) of all files (*.*). If you issue that in the command prompt exactly as shown above (dir *.*) you will see the results right there in the command prompt window. Try it...won't hurt anything...the 100+ lines with the file names in that folder will fly by quickly! But when you put the greater-than symbol (>) and a file name after the dir command, that means to direct all of the output from the command into that file. So even though it worked perfectly, you won't see a thing...it will simply come back to the next line waiting for your next command. In other words, because all of the output from the dir command went into a file, you didn't see anything! But I assure you it worked fine, which you will see as soon as you open the text file in Notepad. I hope that helps to explain what's happening. Regards, Joe
0
 
LVL 7

Author Comment

by:tomfarrar
ID: 39266018
Hi Joe - Thank you so much for the quick and comprehensive answer.  I had to bug out last night early so I didn't get a chance to get back with your quick responses.  ANyway, thanks again and I must say I have had some good answers here, but none as quick and comprehensive as yours.  - Tom
0
 
LVL 7

Author Closing Comment

by:tomfarrar
ID: 39266025
Best response ever at Experts Exchange (and I have gotten many good responses).
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 39266095
Tom,
You're very welcome. And thanks to you for the kind words – I truly appreciate it! Regards, Joe
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Remote login in windows 7 8 72
Windows 10 install after disk failure 5 65
WSUS Update on Window 7 client 6 55
Unable to install Canon shared printers on Windows 7 PC's 6 52
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question