Solved

Excel List Of Files in WIndows Explorer FOlder

Posted on 2013-06-20
13
356 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 52

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 52

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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 52

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 52

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 52

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 52

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 52

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 52

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

776 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