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 (May 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 9 May 2005 16:19:01 -0000
Reply-To:   sa polo <solouga2@rediffmail.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   sa polo <solouga2@REDIFFMAIL.COM>
Subject:   Processing multiple CSV files from a directory
Content-Type:   text/plain; charset=iso-8859-1

Hi All, I am attempting to write a program to read CSv files from several sub-directories and process them by adding a date field and part of the file name to the new file which is again in CSV format. Directory: c:\ Sub-Dirs : 20010101, 20010102 ................. CSV Files in each directory abc_a.csv, abc_ab.csv abc_se.csv abc_po.csv abc_**** ......... Extract the data from each file merge the date(obtained from the sub- directory) in date9. format and whatever appears after the _(underscore ) in the file name . example File abc_a in directory 20010101: 1,se,oo,poll output 1,se,oo,poll,01JAN2001,a The program should read all the sub-directories in the directory in this case c:\ and process all files and write them to a separate location on say another drive or directory in the same csv format . All assistance is much appreciated as usual. Sa  


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