How do I print a list of the files I have in a folder?

reynotm
reynotm used Ask the Experts™
on
How do I print a list of the files I have in a folder?
  I would like to print a list of the files I have in my home directory folder or any other folder.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
The simplest way I can think of would be to hit start and select run.  Then to type in "cmd" without the quotes to open a command window.

At the prompt, you should navigate through the directories to the one you want a listing of using the CD command.  Once at your desired folder, type "dir /s > files.txt" again, without the quotes.  After a few seconds (minutes if there are a lot of files) this will list every file in the directory as well as every file in sub directories and save them all them all as a file named files.txt.  Then you can open that file in notepad or any other editor and look at them and print them if you so desire.

Hope that's what you are looking for.

Dave

Author

Commented:
Thanks for the input. I knew this one. I'm hoping that there is a way that a user might be able to handle this without having to go to the command line. Is there one?
You could create a batch file then give the user access to the file.

The file would contain the following lines:-

@echo off
dir /s > files.txt
exit

save as listfiles.bat or whatever.
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Author

Commented:
I love batch files...Is there no way to do this using the GUI?
Commented:

I use a program called CoolFind to do this. You can search for almost anything and export to a comma delimited text file. You can find CoolFind at http://www.coolfilesearch.com/.

This is an excellent program and is definitely a keeper!

Commented:
Check this link out:
Printing Directory Listings from Windows File Manager
http://support.microsoft.com/default.aspx?scid=kb;en-us;65445
You can download the MSDOS.EXE app. from :
http://www.powerload.fsnet.co.uk/win3x.htm
The file is included into an archive (MSEXE.EXE   Microsoft Executive Shell (MSDOS.EXE) from Windows 2.0 & 3.0  42KB ).

Hope this will help, Chris.

Commented:
If you want the file output in a more graphical output, you can replace the dir /s > files.txt with "tree /f /a > files.txt"

That will put them in a bit more graphical lineup for you.  I'm not saying it's the best solution, but putting that in a batch file would get the task done, unless I'm just missing something.

Dave

Author

Commented:
jhieb-Thanks! Great program! Have a user that really needed this, which means I really needed it...
Again with accolades! Threw in an extra 100 points.
reynotm

Commented:
Great! Glad to be of help and thank you for the extra points! If you plan on importing the comma delimited file into Access remember to change the the option for the number to bytes. Also, you might want to increase the number of searchable files to 10,000,000. Generally, though, it may give you problems after 900,000 files or so. Other than that, it works great.

Also, the support person is very accomodating and friendly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial