I had been using the code below and do some parsing to create an inventory of the contents of a folder and subfolders including path, name of file, file extension, date modified, time modified, and file size. However, our IT department is taking away our ability to use the ls command inside Viya making this code obsolete.
filename pipedir pipe %sysfunc(quote(ls -lR --full-time "&pathDir" )) lrecl=1000;
data DIR_RAW;
infile pipedir truncover;
input line $char1000.;
run;
I was directed to other SAS options such as data information functions (Paper Template (lexjansen.com) but from what I can tell they're pretty limited. For example, I can get the filename but not the path if the file is in a sub-folder. I also can't seem to find a way to get the date modified, time modified, or file size.
If I only needed to inventory SAS datasets then I could use proc datasets (SAS Help Center: Requesting a Directory Listing for a SAS Library) to get most of the information I need, but I need all file types. It also doesn't seem to include sub-folders.
Any ideas? Using SAS Viya V.03.05M0P111119
... View more