Solved

Excel List Of Files in WIndows Explorer FOlder

Posted on 2013-06-20
13
354 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
  • 8
  • 5
13 Comments
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
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 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
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
Comment Utility
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
 
LVL 7

Author Comment

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

Accepted Solution

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

dir *.*>filelist.txt

Likewise,

dir *.*>filelistbare.txt /b

Regards, Joe
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
Oh, I just looked at your document...there needs to be a space between dir and *.*
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Author Comment

by:tomfarrar
Comment Utility
Still not getting there yet.  Thanks for your patience, Joe.  See attachment.
EE-Doc.docx
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
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 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
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 51

Expert Comment

by:Joe Winograd, EE MVE
Comment Utility
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
Comment Utility
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
Comment Utility
Best response ever at Experts Exchange (and I have gotten many good responses).
0
 
LVL 51

Expert Comment

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

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now