copy DIR to TXT file

Forum Windows XP : Windows XP General Discussion - copy DIR to TXT file

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Hi folks,

I used to be able to do this in DOS so easily but I
haven't used DOS in sooo long I've forgotten how!

All I want to do is copy file names from a directory to a
text file so then I can import those file names into an
Excel spreadsheet.

How do I get the dir file names into a text file?

Thanks

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Tony,

How to add the Print Directory feature for folders in Windows XP:
http://support.microsoft.com/?kbid=321379

--
Ramesh, Microsoft MVP
Windows XP Shell/User
http://windowsxp.mvps.org


"Tony" <anonymous@discussions.microsoft.com> wrote in message news:0db501c4e65a$c761d860$a301280a@phx.gbl...
Hi folks,

I used to be able to do this in DOS so easily but I
haven't used DOS in sooo long I've forgotten how!

All I want to do is copy file names from a directory to a
text file so then I can import those file names into an
Excel spreadsheet.

How do I get the dir file names into a text file?

Thanks

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Hi

You can re-direct to a text file with the following command:

dir > dir.txt

naming the text file whatever you want and saving it in whichever folder you
want to.

--


Will Denny
MS-MVP Windows Shell/User
Please reply to the News Groups


"Tony" <anonymous@discussions.microsoft.com> wrote in message
news:0db501c4e65a$c761d860$a301280a@phx.gbl...
> Hi folks,
>
> I used to be able to do this in DOS so easily but I
> haven't used DOS in sooo long I've forgotten how!
>
> All I want to do is copy file names from a directory to a
> text file so then I can import those file names into an
> Excel spreadsheet.
>
> How do I get the dir file names into a text file?
>
> Thanks

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

That's not exactly what I was looking for but I did add
that capability to my folder options.

Thanks!

Tony

>-----Original Message-----
>Tony,
>
>How to add the Print Directory feature for folders in
Windows XP:
>http://support.microsoft.com/?kbid=321379
>
>--
>Ramesh, Microsoft MVP
>Windows XP Shell/User
>http://windowsxp.mvps.org
>
>
>"Tony" <anonymous@discussions.microsoft.com> wrote in
message news:0db501c4e65a$c761d860$a301280a@phx.gbl...
>Hi folks,
>
>I used to be able to do this in DOS so easily but I
>haven't used DOS in sooo long I've forgotten how!
>
>All I want to do is copy file names from a directory to a
>text file so then I can import those file names into an
>Excel spreadsheet.
>
>How do I get the dir file names into a text file?
>
>Thanks
>.
>

Reply to Tony

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Doh!

It's been a few years.

Thanks, Will

Man do I miss the simplicity of DOS!

Tony

>-----Original Message-----
>Hi
>
>You can re-direct to a text file with the following
command:
>
>dir > dir.txt
>
>naming the text file whatever you want and saving it in
whichever folder you
>want to.
>
>--
>
>
>Will Denny
>MS-MVP Windows Shell/User
>Please reply to the News Groups
>
>
>"Tony" <anonymous@discussions.microsoft.com> wrote in
message
>news:0db501c4e65a$c761d860$a301280a@phx.gbl...
>> Hi folks,
>>
>> I used to be able to do this in DOS so easily but I
>> haven't used DOS in sooo long I've forgotten how!
>>
>> All I want to do is copy file names from a directory to
a
>> text file so then I can import those file names into an
>> Excel spreadsheet.
>>
>> How do I get the dir file names into a text file?
>>
>> Thanks
>
>
>.
>

Reply to Tony

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Some of the good old DOS commands come in handy at times.

--


Will Denny
MS-MVP Windows Shell/User
Please reply to the News Groups


"Tony" <anonymous@discussions.microsoft.com> wrote in message
news:0dcc01c4e662$a18ccfc0$a301280a@phx.gbl...
> Doh!
>
> It's been a few years.
>
> Thanks, Will
>
> Man do I miss the simplicity of DOS!
>
> Tony
>
>>-----Original Message-----
>>Hi
>>
>>You can re-direct to a text file with the following
> command:
>>
>>dir > dir.txt
>>
>>naming the text file whatever you want and saving it in
> whichever folder you
>>want to.
>>
>>--
>>
>>
>>Will Denny
>>MS-MVP Windows Shell/User
>>Please reply to the News Groups
>>
>>
>>"Tony" <anonymous@discussions.microsoft.com> wrote in
> message
>>news:0db501c4e65a$c761d860$a301280a@phx.gbl...
>>> Hi folks,
>>>
>>> I used to be able to do this in DOS so easily but I
>>> haven't used DOS in sooo long I've forgotten how!
>>>
>>> All I want to do is copy file names from a directory to
> a
>>> text file so then I can import those file names into an
>>> Excel spreadsheet.
>>>
>>> How do I get the dir file names into a text file?
>>>
>>> Thanks
>>
>>
>>.
>>

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Don't forget Karen's Directory Printer, a nice little free app.
http://www.karenware.com/powertools/ptdirprn.asp

--

Kenny



"Will Denny" <willdenny@mvps.org> wrote in message
news:%23BlXTNm5EHA.3336@TK2MSFTNGP11.phx.gbl...
> Some of the good old DOS commands come in handy at times.
>
> --
>
>
> Will Denny
> MS-MVP Windows Shell/User
> Please reply to the News Groups
>
>
> "Tony" <anonymous@discussions.microsoft.com> wrote in message
> news:0dcc01c4e662$a18ccfc0$a301280a@phx.gbl...
> > Doh!
> >
> > It's been a few years.
> >
> > Thanks, Will
> >
> > Man do I miss the simplicity of DOS!
> >
> > Tony
> >
> >>-----Original Message-----
> >>Hi
> >>
> >>You can re-direct to a text file with the following
> > command:
> >>
> >>dir > dir.txt
> >>
> >>naming the text file whatever you want and saving it in
> > whichever folder you
> >>want to.
> >>
> >>--
> >>
> >>
> >>Will Denny
> >>MS-MVP Windows Shell/User
> >>Please reply to the News Groups
> >>
> >>
> >>"Tony" <anonymous@discussions.microsoft.com> wrote in
> > message
> >>news:0db501c4e65a$c761d860$a301280a@phx.gbl...
> >>> Hi folks,
> >>>
> >>> I used to be able to do this in DOS so easily but I
> >>> haven't used DOS in sooo long I've forgotten how!
> >>>
> >>> All I want to do is copy file names from a directory to
> > a
> >>> text file so then I can import those file names into an
> >>> Excel spreadsheet.
> >>>
> >>> How do I get the dir file names into a text file?
> >>>
> >>> Thanks
> >>
> >>
> >>.
> >>
>
>

Reply to Kenny

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Tony wrote:
> Hi folks,
>
> I used to be able to do this in DOS so easily but I
> haven't used DOS in sooo long I've forgotten how!
>
> All I want to do is copy file names from a directory to a
> text file so then I can import those file names into an
> Excel spreadsheet.
>
> How do I get the dir file names into a text file?
>
> Thanks


From the command prompt (Start > Run > Cmd.exe), simply change to
the desired directory and type "dir > filelist.txt" or "dir > lpt1,"
just as you used to do in DOS. Any of the switches for the DIR
command (type "dir /?" ) will work with this command, if you wish to
modify the output. You can then subsequently edit the resulting text
file using NotePad, WordPad, Word, etc.

Alternatively:

HOW TO Add a Print Directory Feature for Folders in Windows XP
http://support.microsoft.com/?kbid=321379



C:\>dir /?
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
Specifies drive, directory, and/or files to list.

/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years

Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

--

Bruce Chambers

Help us help you:
http://dts-l.org/goodpost.htm
http://www.catb.org/~esr/faqs/smart-questions.html

You can have peace. Or you can have freedom. Don't ever count on having
both at once. - RAH

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Like DEL, when a file says is in use by another process (in Win Explorer)
but deletes fine in CMD-prompt...


--
Tumppi
Reply to group
=================================================
Most learned on nntp://news.mircosoft.com
Helsinki, Finland (remove _NOSPAM)
(translations from FI/SE not always accurate)
=================================================



"Will Denny" <willdenny@mvps.org> kirjoitti viestissä
news:%23BlXTNm5EHA.3336@TK2MSFTNGP11.phx.gbl...
> Some of the good old DOS commands come in handy at times.
>
> --
>
>
> Will Denny
> MS-MVP Windows Shell/User
> Please reply to the News Groups
>
>
> "Tony" <anonymous@discussions.microsoft.com> wrote in message
> news:0dcc01c4e662$a18ccfc0$a301280a@phx.gbl...
> > Doh!
> >
> > It's been a few years.
> >
> > Thanks, Will
> >
> > Man do I miss the simplicity of DOS!
> >
> > Tony
> >
> >>-----Original Message-----
> >>Hi
> >>
> >>You can re-direct to a text file with the following
> > command:
> >>
> >>dir > dir.txt
> >>
> >>naming the text file whatever you want and saving it in
> > whichever folder you
> >>want to.
> >>
> >>--
> >>
> >>
> >>Will Denny
> >>MS-MVP Windows Shell/User
> >>Please reply to the News Groups
> >>
> >>
> >>"Tony" <anonymous@discussions.microsoft.com> wrote in
> > message
> >>news:0db501c4e65a$c761d860$a301280a@phx.gbl...
> >>> Hi folks,
> >>>
> >>> I used to be able to do this in DOS so easily but I
> >>> haven't used DOS in sooo long I've forgotten how!
> >>>
> >>> All I want to do is copy file names from a directory to
> > a
> >>> text file so then I can import those file names into an
> >>> Excel spreadsheet.
> >>>
> >>> How do I get the dir file names into a text file?
> >>>
> >>> Thanks
> >>
> >>
> >>.
> >>
>
>

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Will Denny wrote:
>> Some of the good old DOS commands come in handy at times.
>>
>> --
....

Yes, but you know, this and many other like it should have been
in windows from the 3.0 days and onward; Many people never heard
of DOS but still have all the same problems DOS served so well
and so simply. I've often wondered why.

Pop

Reply to pop

Archived from groups: microsoft.public.windowsxp.basics (More info?)

 

Bruce Chambers wrote:
>> Tony wrote:
....
>> From the command prompt (Start > Run > Cmd.exe), simply
>> change to
>> the desired directory and type "dir > filelist.txt" or "dir >
>> lpt1,"
>> just as you used to do in DOS. Any of the switches for the
>> DIR
>> command (type "dir /?" ) will work with this command, if you
>> wish to
>> modify the output. You can then subsequently edit the
>> resulting text
>> file using NotePad, WordPad, Word, etc.
>>
>> Alternatively:
....

Huh! That is so wonderfully simple I am simply AMAZED at how
stupid I am! I never even came close to thinking about doing it
that way! I mean, I come from way back when and CP/M and the
whole shot, and should have known!
How quickly we forget old friends, sometimes. I particularly
like the cmd method because it doesn't put more rubbish in the
right click menues.

KUDOS!!

Pop

Reply to pop
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > copy DIR to TXT file
Go to:

There are 941 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them