BookmarkSubscribeRSS Feed
srinath3111
Quartz | Level 8

Hi,

 

I have a folder in my local d drive. in that folder i have various Excel, Csv workbooks and Tab files with different names.

 

So here i wanted to just extract the name's and type of the file and size of the file into a data set.

 

Thanks

6 REPLIES 6
andreas_lds
Jade | Level 19

Look at the f-function: finfo, fopen and the dopen-function together with dread and dnum to iterate over the contents of the directory. If you can execute shell commands, use dir or ls (depending on the os) together with filename statement. There are many examples out there, i am sure you will useful ideas.

srinath3111
Quartz | Level 8

Hi,

 

When I provide server path's also it wont work?.

 

Thanks.

srinath3111
Quartz | Level 8

Hi,

 

I am working out in server along with the server path's.

 

Thanks.

Kurt_Bremser
Super User

Please make up your mind. Quote from your original post:

 

"I have a folder in my local d drive."

(emphasis by me)

 

Are we talking about server resources, or resources on your desktop?

 

Please specify in-depth information about your SAS setup, and which data on which location you want to inspect for filenames.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 889 views
  • 0 likes
  • 3 in conversation