BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8

Hi,

Does anyone have SAS code that retrieves the file attibutes of all files/folders in a directory?

I'm particularly interested in date modified and owner name.

Thank you.

3 REPLIES 3
snoopy369
Barite | Level 11

Create a named pipe and get that from the directory listing?  Exact code depends on OS, but the concept should be the same.

filename myfile pipe "dir C:\temp\ /q";  */q gets owner in windows;

data mystuff;

infile myfile lrecl=500;

input (whatever you are interested in);

run;

gzr2mz39
Quartz | Level 8

Thank you for the reply.

I ran the following code:

http://support.sas.com/kb/38/279.html

For "owner" I only see:

BUILTIN\Administrators

8

1

8

2

2

5

Do you know what this is referring to?

art297
Opal | Level 21

It would help if you posted all of the code that you ran.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1874 views
  • 0 likes
  • 3 in conversation