List of files

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

A while back, I remember seeing (or was it my imagination) someone post a
comment about Vista having a built-in utility that would create a text file
on the desktop that listed the files/folders within a directory.

If this is true, could someone refresh my memory.

Thank you
 
Hi,

It's not a utility, but a simple command. Click start and type CMD, then hit
<enter> to open the prompt. Then run:

dir /s "drive:\folder_path" >%userprofile%\desktop\list.txt

"drive:\folder_path" being the folder you want to index, and list.txt being
the file name that is created on the desktop. You can use any name you
choose. If you want to index protected system folders, before beginning you
should right click on the CMD entry in the start menu and use 'run as
administrator'.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
My thoughts http://rick-mvp.blogspot.com
 
Rick

You never seem to amaze me. Your responses are not only
correct but, are always polite.

Congrats' mate, you well deserve your MVP +
 
I must be dense as a rock. I did the search typing in "cmd" and hit enter
and got a prompt.
Then typed in"
dir /s "H:\Vista Software II >%userprofile%\desktop\vistasoftware.txt

Got this "The filename, directory name, or volume label syntax is
incorrect."

The directory I want to print the is on H drive and the folder is Vista
Software II <a very simple path and is correct>. I wanted to name the text
file vistasoftware.

Where did I go wrong ???
btw the prompt when hit enter after typing in cmd was C:\Users\myname. Not
sure if that matters.

So still need some help please
 
dir /s "H:\Vista Software II" > %userprofile%\desktop\vistasoftware.txt

add quotes after II.
 
I must have missed something in the postings. This reply is the only one I
see now as the original post does NOT show now < removed I guess>. I still
can NOT get the list made and assume I am using the wrong format.
 
LOL Newsgroups are acting up and now the posts are back except my original.
I think I have it now. Thanks MacArthur I will make the change and check it
out.
 
It worked and created the text file. One more question and I will let it
be.
Is there anyway to format what the text file will generate.? Example the
folder I generated the list for has actually has several folders withing it.
Can I make it generate only the list of folders within the main folder and
not the actual list of files?

Hope that makes sense. Thank you.
 
dir /s /o:gn "H:\Vista Software II" >
%userprofile%\desktop\vistasoftware.txt will list a sorted folder list
including all folders, sub folders and files.

dir /o:gn "H:\Vista Software II" > %userprofile%\desktop\vistasoftware.txt
will list a sorted folder list including folders and files. If you only
want the list of folders; edit the text file to delete the file names
following the folder names.
 
Fantastic, ty MacArthur

MacArthur said:
dir /s /o:gn "H:\Vista Software II" >
%userprofile%\desktop\vistasoftware.txt will list a sorted folder list
including all folders, sub folders and files.

dir /o:gn "H:\Vista Software II" > %userprofile%\desktop\vistasoftware.txt
will list a sorted folder list including folders and files. If you only
want the list of folders; edit the text file to delete the file names
following the folder names.

--
Live strong and have a nice day, - "Nil carborundum illegitimi"!
Mac H E L P the planet - Don't I D L E ! ! !
Over 1600 Links at Http://MacArthur.Funknstyle.Com
Pictures at http://www.flickr.com/photos/macarthur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top