LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 5 Sep 2005 15:53:43 -0600
Reply-To:     Alan Churchill <SASL001@SAVIAN.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Alan Churchill <SASL001@SAVIAN.NET>
Subject:      Re: File size on Windows.
Comments: To: "Patnaik, Tirthankar" <tirthankar.patnaik@CITIGROUP.COM>
In-Reply-To:  <4D99E437F08B6849A39DB6103EA3584905C09BB0@EXINMB06.apac.nsroot.net>
Content-Type: text/plain; charset="US-ASCII"

Tir,

Awhile back, I wrote a command-line utility to provide better directory information. You can get it for free at:

http://www.savian.net/Utilities.aspx

It is called GetFileInfo. Use a /? On the command-line to see args but it operates like:

GetFileInfo "c:\temp" "*.sas" "c:\temp\outinfo.txt"

Output is a tab-delimited file with headers.

Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Patnaik, Tirthankar Sent: Monday, September 05, 2005 11:19 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: File size on Windows.

Art, Thanks very much for this, I'd tried this method before, but there are too many inconsistencies--dir names, dir summaries, and what have you. Found that /q was the only flag that gave some clean output, but no size! Then I wondered if there was a better way...:)

best, -Tir

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of > Arthur Tabachneck > Sent: Monday, September 05, 2005 9:57 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: File size on Windows. > > > Tir, > > The following doesn't even compare with Richard's link but, > in the event > that you can live with the information output by the MS dir > command, then > you could just change your /b to /q. > > For example, something like: > > filename fh pipe 'dir /q /s c:\tir\ddir'; > data fdir (drop=dir); > infile fh lrecl=300 truncover firstobs=6; > input date mmddyy8. @11 time $10. @23 dir $5. @28 size $10. > @38 owner $22. @61 name $40.; > if trim(upcase(dir)) ne '<DIR>' and date ne .; > run; > > Art > ---------- > On Mon, 5 Sep 2005 17:12:35 +0530, Patnaik, Tirthankar > <tirthankar.patnaik@CITIGROUP.COM> wrote: > > >Folks, > > Is there any way one can find the size of a file, and other > attributes on Windows? I use an anonymous pipe to take in the list of > files in a dir, and all it's subdirectories. I also have code > to find out > some properties of a file. I'd like to get the size, owner, and other > attributes of each file in my dir. Any ideas how? >


Back to: Top of message | Previous page | Main SAS-L page