@sdemirel wrote:
Hi everyone,
I want to get the last modified date of a located file with FINFO function. I am using following code part for this but I am not getting any value and "modifydt" returns null. Could you please give a feedback on how I should fix this? thanks in advance.
SAS Enterprise Guide Version: 7.15
Program:
data info (keep=modifydt);
rc = filename("onefile","C:\Users\sdmrl\Desktop\test.xls");
fid = fopen("onefile");
modifydt = FINFO(fid,"Last Modified");
run;
If your value for RC is anything other than 0 the filename statement failed to assign a fileref.
If your value for FID is 0 it failed to open the file.
In either of the above fail then pretty much expect FINFO to fail.