Solved

Excel List Of Files in WIndows Explorer FOlder

Posted on 2013-06-20
13
355 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
 
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cisco AnyConnect SBL and system software deployments 2 43
local administrator password solution 26 73
Windows Update 22 139
Connect VMs in VirtualBox 4 27
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

932 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

13 Experts available now in Live!

Get 1:1 Help Now