I have several files that gets added to the folder daily. For example: test140429.xlsx, test140430.xlsx, test00502.xlsx,test00503.xlsx, test00504.xlsx and so on.. In the above example test140429.xlsx (14 stands for year 2014, 04 -- April and 29 - day). But May file I do not have year front of them for example test00502.xlsx, test00503.xlsx and so on. I want to rename the files as test140502.xlsx, test140503.xlsx and so on. I would appreciate if anybody can help me in this. I am using following code to read the files in the directory. %let src=c:\temp; data srcdata ; infile "dir /b ""&src\"" " pipe truncover; input fname $256. ; if index(fname,"test") > 0; run;
... View more