Copying File Names into a List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have just added 15000 + files to a folder & would like to be able to make a
list of them that I can send via email to friends. I'm hoping I don't have to
type them all in individually.
Is there a way of copying the file names into a list?
I'd appreciate any help.
Thank you, Martin.
 
Several ways to do this. Here are a couple.

Add a Print Directory Feature for Folders in Windows XP
http://www.mvps.org/sramesh2k/PrintDirectory.htm

HOW TO: Add a "Print Directory" Feature for Folders in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;321379

Karen's Directory Printer
http://www.karenware.com/powertools/ptdirprn.asp

You can use the dir command and send the output to a text file.

Open a command prompt...
Start | Run | Type: cmd | Click OK or hit your Enter key.

Change Directory to the folder that you want.

cd C:\Documents and Settings\Your Name Here\blahblah

Hit your Enter key.

Type or paste the following command and hit Enter.

dir /b /o:ng > "%userprofile%\Desktop\Directory.txt"

Directory.txt will be created on your Desktop.

Without Changing Directory.

Open a command prompt and type or paste the following command and hit Enter
after changing the path in the command to the folder that you want.

dir "C:\Documents and Settings\Your Name Here\blahblah" /b
/n>"%userprofile%\Desktop\dirlist.txt"

The line wrapped. There should be one space between /b and /n.

Directory.txt will be created on your Desktop.

/b Uses bare format, no date, time or size listed.

/o:ng O list by files in sorted order. N alphabetic by name. G groups
directories first.

Type: cd /? for Help on the cd command.

Type: dir /? for Help on the dir command.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
go to command prompt navigate to parent folder of ur files then enter the
following:
"dir/s > dir.txt" this will create an text file with all files details in it
including subdirectories etc etc. u can use /a:h to add hidden too. if u
want every sub directory to have a similar file create a batch file in
windows system32 folder with the following content
--------------------------begin below
@echo off
echo files > dir.txt
dir/s >> dir.txt
echo hidden files >> dir.txt
dir/a:h >> dir.txt
--------------------------end above

save as anyname like listfiles.bat
now when u enter this command listfiles in any directory a text file is
created with all files including hidden in a file called dir.txt in the
directory u are present.

Hope this helps...,
Umesh Thota
www.windowsworkshop.com
 
Hi Thota, thanks so much for your response. The other options only help me to
pprint a hard copy, yours will let me make a .txt file which is what I want.
However, I'm sorry to say that I can go to cmd prompt but do not know how to
navigate to the parent folder.
If you could help further I would be very grateful.
Many thanks again, Martin.
 
Scroll down in my first post.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
I'm sorry, but I'm a mere user & don't understand writing cmd or dir.
I have tried the following;
in cmd it shows C:\Documents and Settings\My Name>
I have typed with & without a space between the > after my name folllowed by;
/b>%userprofile%\Desktop\dirlist.txt and
/b>"%userprofile%\Desktop\dirlist.txt" and
/b %userprofile%\Desktop\dirlist.txt and
/b%userprofile%\Desktop\dirlist.txt

I cannot remove the > at the end of My Name.
 
Martin,
I cannot remove the > at the end of My Name.

That > symbol is the prompt, you cannot remove it, you can change it, but
that is another chapter.

After you do the following, post back with the path to the folder that you
want to create a list from and I or somebody will help you do it.

Path to the folder, i.e. C:\
First thing to do is to set up the command prompt so that you can copy and
paste easily, this helps to avoid typing mistakes.

Command Prompt Copy & Paste

This will set the QuickEdit Mode and the Insert Mode.

Right click the cmd.exe shortcut | Properties | Options tab |
Under Edit Options select both:
QuickEdit mode
and
Insert mode
Click Apply | Click OK

QuickEdit mode explanation...
[[Enables you to use a pointing device (mouse) to cut and paste, bypassing
the Edit menu.]]

This option provides a fast, easy way to copy text from (and paste text
into) Command Prompt windows with a mouse. You can highlight text with a
mouse and use the Enter key to copy the highlighted text to the Windows
Clipboard. Or highlight text and right click to copy to clipboard.

Insert mode explanation...
[[Enables you to insert text at the cursor. If this is not selected, text
that is typed at the cursor replaces existing text.]]

This option (on by default) allows you to insert text at the cursor
position. You can right click and paste.

Highlight text with the cursor and hit the Enter key to copy to the Windows
clipboard. Or highlight text and right click to copy to the Windows
clipboard.

[[By selecting the Quick Edit Mode check box, you enable copy and paste from
the Command Prompt window. To copy, select the text in the Command Prompt
window with your left mouse button, and then right-click. To paste, either
at the command prompt or in a text file, right-click.]]

In the mean time, also read the following.

Open a command prompt...
Start | Run | Type: cmd | Click OK or hit your Enter key.

Change Directory to the folder that you want.

cd C:\Documents and Settings\Your Name Here\blahblah

Hit your Enter key.

Type or paste the following command and hit Enter.

dir /b /o:ng > "%userprofile%\Desktop\Directory.txt"

Directory.txt will be created on your Desktop.

Without Changing Directory.

Open a command prompt and type or paste the following command and hit Enter
after changing the path in the command to the folder that you want.

dir "C:\Documents and Settings\Your Name Here\blahblah" /b
/n>"%userprofile%\Desktop\dirlist.txt"

The line wrapped. There should be one space between /b and /n.

Directory.txt will be created on your Desktop.

/b Uses bare format, no date, time or size listed.

/o:ng O list by files in sorted order. N alphabetic by name. G groups
directories first.

Type: cd /? for Help on the cd command.

Type: dir /? for Help on the dir command.
--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Back
Top