Res02
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 7 articles for 0.302 sec
pierre.coste@GMAIL.COM wrote: > >Hi! > >I have a folder containing several files with the same name and >incremented. Like > >res01.txt >res02.txt >res03.txt > >And i need to get the name of the last file (res03.Txt here for >instance) in one variable > >Someone would have an idea ? >Thanks >Pierre Why do you only need the name of the last file? Is it so that you can build a loop     

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: David L Cassell
Date: Aug 30, 2007 22:41

On Unix : FileName MyDir Pipe "ls /sasdata/SG_2007/SIDR/Programs" ; Data Need ; Length FileName $ 200 ; Infile MyDir Truncover End = EOF ; Input FileName $200. ; If EOF ; Run ; On Windows : FileName MyDir Pipe "dir /B /N C:\sasdata\SG_2007\SIDR\Programs" ; Data Need ; Length Text $ 200 ; Infile MyDir Truncover End = EOF ; Input Text $200. ; If EOF ; Run ; Toby Dunn
Show full article (0.93Kb)
The following program uses a PIPEd windows DIR command to read filenames returned by a wild card fileref. In the example below the file with the most recent WRITE date (/TW) is chosen as the file of interest and a FILEREF is created to point to that file. If you want to get, as in your example, the file with the largest number "number part" replace the DATE key with the "number part" variable     

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: toby dunn
Date: Aug 30, 2007 07:11

Pierre , Pipe the files names into a SAS Data set and pick it off from there. Toby Dunn Comprimise is like telling a lie, it gets easier and easier. Each comprimise you make, that becomes your standard. Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else. From: boulmo <pierre.coste@GMAIL.COM> Reply-To: boulmo <pierre.coste@GMAIL
Show full article (1.19Kb)
Have a look at the following example: data a; length file $80; rc=filename("dir","d:\"); d=dopen("dir"); n=dnum(d); do i=1 to n; file=dread(d,i); put file=; end; run; That might be something you can adapt to your needs. Gerhard On Thu, 30 Aug 2007 12:17:37 +0530, Sai Kumar Korrapati (ETS) <saikumark@HCL.IN> wrote: >You can use DOS commands in sas in order     

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: "data _null_,"
Date: Aug 30, 2007 06:42

You can use DOS commands in sas in order to get the file names in a folder Use PIPE command with DOS command , pump the file names to some variable using Filename option in sas In infile statement you can replace the defined filename option . Thanks sai -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of boulmo Sent: Thursday, August 30
Show full article (2.26Kb)
    

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: toby dunn
Date: Aug 30, 2007 06:13

Show full article (0.95Kb)
    

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: Gerhard Hellriegel
Date: Aug 30, 2007 04:21

Show full article (2.13Kb)
    

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: "Sai Kumar Korrapati (ETS
Date: Aug 29, 2007 23:47

Show full article (1.72Kb)
    

Group: comp.softsys.sas · Group Profile · Search for Res02 in comp.softsys.sas
Author: boulmo
Date: Aug 29, 2007 23:37

Show full article (0.26Kb)