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 (January 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 24 Jan 2003 12:00:49 -0500
Reply-To:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:   Re: How to get the file names in one folder into SAS dataset?
Comments:   cc: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.com>
Content-Type:   text/plain

remove the where clause to see what the FileRefs are then read each FileRef with the READ_DIR macro.

> -----Original Message----- > From: Droogendyk, Harry [mailto:Harry.Droogendyk@CIBC.com] > Sent: Friday, January 24, 2003 11:48 AM > To: 'Fehd, Ronald J. (PHPPO)' > Subject: RE: How to get the file names in one folder into SAS dataset? > > Doesn't appear to return the directory / file list he's looking for. > > Have I missed something? > > 354 proc SQL; > 355 > 356 create table FILELIST as > 357 select * > 358 from DICTIONARY.EXTFILES > 359 where FileRef eq '...' > 360 ; > NOTE: Table WORK.FILELIST created, with 0 rows and 3 columns. > > 360! quit; > NOTE: PROCEDURE SQL used: > real time 0.92 seconds > > -----Original Message----- > From: Fehd, Ronald J. (PHPPO) [mailto:rjf2@CDC.GOV] > Sent: January 24, 2003 11:37 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: How to get the file names > in one folder > into SAS dataset? > > > From: Johnson Chang [mailto:jchangmail@YAHOO.COM] > > When i work, I often created many files and > now i have to > > manage them. i wonder there is a way to get > the file names > > and their proprities using SAS system. > > > > For examples, in folder H:\project1\ are there some > > sub-folders and followed by many files under the > sub-folders: > > H:\project1\ H:\project1\code\ > H:\project1\code\code1.sas > > H:\project1\code\code2.sas ... H:\project1\macro\ ... > > H:\project1\output\ H:\project1\output\word1.word > > H:\project1\output\excel1.exl ... ...... > > > > i want a dataset like this, > > > > filename path size date_created > date_lastupdated label ... > > -------- ---- ---- ----------- > ---------------- --- > ... > > code1 h:\... 99MB ... ... > > ...... > > > > How get such a dataset? any suggestion, > reference or link are > > appreciated! Thanks in advance. > > proc SQL;describe table DICTIONARY.EXTFILES;quit; > > proc SQL;create table FILELIST > as > select * > from table DICTIONARY.EXTFILES > where FileRef eq '...' > ;quit; > > Ron Fehd the macro maven CDC Atlanta GA USA > RJF2@cdc.gov > > see also: > > check our most excellent archives: > http://www.listserv.uga.edu/archives/sas-l.html > search for: > subject contains: tip read_dir > author's address: RJF2 > since: 9 Oct 2002 >


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