Jump to content

Directory listing into a txt file. How?


Recommended Posts

  • Replies 9
  • Created
  • Last Reply

Popular Days

Guest RobertVA
Posted

Re: Directory listing into a txt file. How?

 

SliqM wrote:

> TIA

 

In a command prompt window:

 

"dir "(note space) followed by drive letter and path followed by ">"

(redirects output to the file...) followed by drive, path and file name

where you want the listing and FINALLY press the "Enter" key. As usual

you WILL need a set of quotation marks around any drive/path/file name

combination that has ANY spaces.

 

 

Appending ">" and a destination file specification (including drive and

path if necessary) will sent the output of most command prompt commands

to the destination file. For most purposes the destination file

specification should have a ".txt" extension.

 

BUT!

 

For many purposes it would be simpler if you use a Windows based like

directory printer application which can also export directories to

spreadsheets like Excel.

 

From http://www.majusoft.de/DirPrinting/index_en.htm:

 

'DirPrinting is a simple program for viewing and printing directories.

It offers a drive/directory window and a file list, which can be

arranged and sorted according to various criteria. This list can be send

[sic] to any printer (printing preview and storage included). Functions

as "copy to clipboard", "save as file", "send by email", "include

subdirectories" or "file filter" are all available.'

 

"If you copy the list into the clipboard, you can paste it into any

application.

For example in Microsoft Excel:" (followed by a screen shot of a root

folder's directory listing in Excel)

Guest V Green
Posted

Re: Directory listing into a txt file. How?

 

Search your XP helpfile for the TREE command:

---------------

Tree

Graphically displays the directory structure of a path or of the disk in a

drive.

Syntax

---------------

 

For example, to list the structure of the C: drive

and put it into a text file named C_DRIVE.TXT

 

TREE C:\ /a > C:\C_DRIVE.TXT

 

If you want to see ALL the files (will result in a pretty big

..TXT file)

 

TREE C:\ /a /f > C:\C_DRIVE.TXT

 

As with all command line stuff, punctuation matters. Watch

those spaces.

 

 

 

"RobertVA" <robert_c72athotmail@invalid.com> wrote in message

news:eu6TMbBfIHA.5164@TK2MSFTNGP03.phx.gbl...

> SliqM wrote:

> > TIA

>

> In a command prompt window:

>

> "dir "(note space) followed by drive letter and path followed by ">"

> (redirects output to the file...) followed by drive, path and file name

> where you want the listing and FINALLY press the "Enter" key. As usual

> you WILL need a set of quotation marks around any drive/path/file name

> combination that has ANY spaces.

>

>

> Appending ">" and a destination file specification (including drive and

> path if necessary) will sent the output of most command prompt commands

> to the destination file. For most purposes the destination file

> specification should have a ".txt" extension.

>

> BUT!

>

> For many purposes it would be simpler if you use a Windows based like

> directory printer application which can also export directories to

> spreadsheets like Excel.

>

> From http://www.majusoft.de/DirPrinting/index_en.htm:

>

> 'DirPrinting is a simple program for viewing and printing directories.

> It offers a drive/directory window and a file list, which can be

> arranged and sorted according to various criteria. This list can be send

> [sic] to any printer (printing preview and storage included). Functions

> as "copy to clipboard", "save as file", "send by email", "include

> subdirectories" or "file filter" are all available.'

>

> "If you copy the list into the clipboard, you can paste it into any

> application.

> For example in Microsoft Excel:" (followed by a screen shot of a root

> folder's directory listing in Excel)

Guest Gord Dibben
Posted

Re: Directory listing into a txt file. How?

 

Several methods to accomplish this.......I like Tushar's best if importing to

Excel.

 

To add a "Print Directory" feature to Explorer, go to

this KB Article.

 

http://support.microsoft.com/default.aspx?scid=KB;EN-US;q272623&

 

Or you can download Printfolder 1.2 from.....

 

http://no-nonsense-software.com/freeware/

 

I use PF 1.2 and find it to be more than adequate with custom

features.

 

OR Go to Command prompt and chdir to the folder with the files

Type DIR >MYFILES.TXT

 

All the above create a *.TXT file which can be opened in Notepad and printed.

 

One more method if you want to by-pass the *.TXT file and pull

directly to Excel is to use Tushar Mehta's Excel Add-in. This allows filtering

and sorting once you have the data in Excel.

 

http://www.tushar-mehta.com/ scroll down to Add-ins>Directory

Listing.

 

Download the ZIP file and un-zip to your Office\Library folder.

 

 

Gord Dibben MS Excel MVP

 

 

On Sun, 2 Mar 2008 10:07:35 +0700, "SliqM" <snjhaschhd1@chello.nl> wrote:

>TIA

>

Guest SliqM
Posted

Re: Directory listing into a txt file. How?

 

Thanks to you all, i using dirprint now, it does what i want. (full

filenames in a txt file)

Thanks again.

 

S.

 

"Gord Dibben" <gorddibbATshawDOTca> schreef in bericht

news:7ucks39dqq9j9mje98oen881to62e7gcn0@4ax.com...

> Several methods to accomplish this.......I like Tushar's best if importing

> to

> Excel.

>

> To add a "Print Directory" feature to Explorer, go to

> this KB Article.

>

> http://support.microsoft.com/default.aspx?scid=KB;EN-US;q272623&

>

> Or you can download Printfolder 1.2 from.....

>

> http://no-nonsense-software.com/freeware/

>

> I use PF 1.2 and find it to be more than adequate with custom

> features.

>

> OR Go to Command prompt and chdir to the folder with the files

> Type DIR >MYFILES.TXT

>

> All the above create a *.TXT file which can be opened in Notepad and

> printed.

>

> One more method if you want to by-pass the *.TXT file and pull

> directly to Excel is to use Tushar Mehta's Excel Add-in. This allows

> filtering

> and sorting once you have the data in Excel.

>

> http://www.tushar-mehta.com/ scroll down to Add-ins>Directory

> Listing.

>

> Download the ZIP file and un-zip to your Office\Library folder.

>

>

> Gord Dibben MS Excel MVP

>

>

> On Sun, 2 Mar 2008 10:07:35 +0700, "SliqM" <snjhaschhd1@chello.nl> wrote:

>

>>TIA

>>

>

Guest Andrew Murray
Posted

Re: Directory listing into a txt file. How?

 

In old days of MS-DOS, it was something like dir > directory.txt

 

I would think that still available in the Command Line Mode.

 

Not sure you can from GUI, except a PrintScreen, except PrntScn these days

doesn't do what the early functions of that button did.

 

These days it merely takes a screen capture of whatever's on the screen at

the current time, in early days it sent the screen's content to a printer

directly.

 

 

 

"SliqM" <snjhaschhd1@chello.nl> wrote in message

news:47ca1a07_4@news4us.nl...

> TIA

>

Guest Bill in Co.
Posted

Re: Directory listing into a txt file. How?

 

But without the spaces, as I recall.

Thus: dir>output.txt or dir>listing.txt (for example)

 

Andrew Murray wrote:

> In old days of MS-DOS, it was something like dir > directory.txt

>

> I would think that still available in the Command Line Mode.

>

> Not sure you can from GUI, except a PrintScreen, except PrntScn these days

> doesn't do what the early functions of that button did.

>

> These days it merely takes a screen capture of whatever's on the screen at

> the current time, in early days it sent the screen's content to a printer

> directly.

>

>

>

> "SliqM" <snjhaschhd1@chello.nl> wrote in message

> news:47ca1a07_4@news4us.nl...

>> TIA

Posted

Re: Directory listing into a txt file. How?

 

"Bill in Co." <not_really_here@earthlink.net> wrote:

>But without the spaces, as I recall.

>Thus: dir>output.txt or dir>listing.txt

 

I recall it needing the spaces between "dir" and the rest

Guest Bill in Co.
Posted

Re: Directory listing into a txt file. How?

 

PD43 wrote:

> "Bill in Co." <not_really_here@earthlink.net> wrote:

>

>> But without the spaces, as I recall.

>> Thus: dir>output.txt or dir>listing.txt

>

> I recall it needing the spaces between "dir" and the rest

 

I think your memory is off.

Guest V Green
Posted

Re: Directory listing into a txt file. How?

 

 

"Bill in Co." <not_really_here@earthlink.net> wrote in message

news:OEOfWhMfIHA.4144@TK2MSFTNGP05.phx.gbl...

> PD43 wrote:

> > "Bill in Co." <not_really_here@earthlink.net> wrote:

> >

> >> But without the spaces, as I recall.

> >> Thus: dir>output.txt or dir>listing.txt

> >

> > I recall it needing the spaces between "dir" and the rest

>

> I think your memory is off.

 

Works either way. You're both right.

 

>

>


×
×
  • Create New...