Index
2011-08-11 09:16Matt Slay : DIR command output????
2011-08-11 09:35Richard Kaye : RE: DIR command output????
2011-08-11 10:37Dave Crozier : RE: DIR command output????
2011-08-11 11:07Alan Bourke : Re: DIR command output????
2011-08-11 14:59MB Software Solutions, LLC : Re: DIR command output????
2011-08-11 18:19Gérard Lochon : Re: DIR command output????
Back to top
DIR command output????

Author: Matt Slay

Posted: 2011-08-11 09:16:00   Link

Is there any way to make the output from the DIR command show more

information about the files in the current directory? I would expect to see

output much like the real DOS command where it shows columns of information

that include the filename, date, and file size in a vertical flowing format.

It seems that the DIR command in FoxPro is designed to work with DBF files

be default, and it does show more info about those files.

However, if you use Dir *.*, then what FoxPro spits out is some dorky

sideways list of just file names, without the date and filesize. It's just

really hard to read. What were they thinking?

Has anyone developed a better DIR command for VFP????

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/025501cc5828$d1803c00$7480b400$@com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Matt Slay
Back to top
RE: DIR command output????

Author: Richard Kaye

Posted: 2011-08-11 09:35:13   Link

I think you're right; DIR was designed for DBFs first. Use ADIR() instead.

--

rk

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On Behalf Of Matt Slay

Sent: Thursday, August 11, 2011 9:16 AM

To: profoxtech@leafe.com

Subject: DIR command output????

Is there any way to make the output from the DIR command show more information about the files in the current directory? I would expect to see output much like the real DOS command where it shows columns of information that include the filename, date, and file size in a vertical flowing format.

It seems that the DIR command in FoxPro is designed to work with DBF files be default, and it does show more info about those files.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD04419F13D19F6@ACKBWDDQH1.artfact.local

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Richard Kaye
Back to top
RE: DIR command output????

Author: Dave Crozier

Posted: 2011-08-11 10:37:33   Link

Matt,

If you want to load up recursed directories into a table then use this:

Dave

*******

* Start of Code

*

* Display Files in a Folder within a Table

Clear All

Clear

Public oForm

oForm=Createobject("MyForm",Addbs(Getdir("c:\temp\")),"*.*",.F.)

Define Class MyForm As Form

AllowOutput=.F. && so '?' output goes to screen

Width=_Screen.Width

Height=_Screen.Height-50

Width=1024

Height=798

Procedure Init(cPath As String, cMask As String, fSubDir As Boolean)

Set Exclusive Off

Set Safety Off

Set Talk Off

Set Exact Off

Create Cursor Files (Path c(240),fname c(240),Fsize N(10,0),Timestamp T)

This.DoDir(cPath,cMask)

Index On Timestamp Descending Tag T && choose your desired order

* INDEX on fsize DESCENDING TAG fsize

With This

.AddObject("gr","grid")

With .gr

.AllowCellSelection=.F.

.Visible=1

.Height=Thisform.Height

.Width = Thisform.Width

.AutoFit

.Column3.InputMask="999,999,999"

Endwith

.Show

*

Endwith

Procedure DoDir(cPath As String, cMask As String)

Local N,i,aa[1]

N=Adir(aa,cPath+cMask,"",1)

For i = 1 To N

Insert Into Files (Path,fname,Fsize,Timestamp) Values ;

(cPath, aa[i,1], aa[i,2],Ctot(Dtoc(aa[i,3])+aa[i,4]))

Endfor

N=Adir(aa,cPath+"*.*","HD",1) && now without the mask, search for directories

For i = 1 To N

If "D"$aa[i,5] && if it's a dir

If aa[i,1] != '.'

This.DoDir(cPath+aa[i,1]+"\",cMask) && recur

Endif

Endif

Endfor

Enddefine

*

* End of Code

****************

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf Of Matt Slay

Sent: 11 August 2011 14:16

To: profoxtech@leafe.com

Subject: DIR command output????

Is there any way to make the output from the DIR command show more

information about the files in the current directory? I would expect to see

output much like the real DOS command where it shows columns of information

that include the filename, date, and file size in a vertical flowing format.

It seems that the DIR command in FoxPro is designed to work with DBF files

be default, and it does show more info about those files.

However, if you use Dir *.*, then what FoxPro spits out is some dorky

sideways list of just file names, without the date and filesize. It's just

really hard to read. What were they thinking?

Has anyone developed a better DIR command for VFP????

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/BD031ECABF2B60499200AAB3DBB4A999736289CB@EX-A-FPL.FPL.LOCAL

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Dave Crozier
Back to top
Re: DIR command output????

Author: Alan Bourke

Posted: 2011-08-11 11:07:08   Link

On Thu, 11 Aug 2011 08:16 -0500, "Matt Slay"

<mattslay@jordanmachine.com> wrote:

> However, if you use Dir *.*, then what FoxPro spits out is some dorky

> sideways list of just file names, without the date and filesize. It's

> just

> really hard to read. What were they thinking?

Probably they were thinking "this DIR command dates from xbase days, VFP

isn't an OS, so why go nuts formatting the output, there are better ways

like Adir() or Windows scripting."

--

Alan Bourke

alanpbourke (at) fastmail (dot) fm

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1313075228.31398.140258128561013@webmail.messagingengine.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Alan Bourke
Back to top
Re: DIR command output????

Author: MB Software Solutions, LLC

Posted: 2011-08-11 14:59:51   Link

On 8/11/2011 9:16 AM, Matt Slay wrote:

> Is there any way to make the output from the DIR command show more

> information about the files in the current directory? I would expect to see

> output much like the real DOS command where it shows columns of information

> that include the filename, date, and file size in a vertical flowing format.

>

>

>

> It seems that the DIR command in FoxPro is designed to work with DBF files

> be default, and it does show more info about those files.

>

>

>

> However, if you use Dir *.*, then what FoxPro spits out is some dorky

> sideways list of just file names, without the date and filesize. It's just

> really hard to read. What were they thinking?

>

>

>

> Has anyone developed a better DIR command for VFP????

Look up ADIR in VFP Help. It'll give you what you need!

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4E4426A7.5020500@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 MB Software Solutions, LLC
Back to top
Re: DIR command output????

Author: Gérard Lochon

Posted: 2011-08-11 18:19:05   Link

>

>

> Has anyone developed a better DIR command for VFP????

Just look at ADIR() function !

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1B8CA8934D6147CC88B4C9E447F11A8F@MuriellePC

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Gérard Lochon