BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

Hi all,

How to get a list of filename within a folder. please can you suggest with sas program.

 

We disabled XCMD so below logic won't work.

https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-i...

We are planning to implement custom functions in near future.

Thanks,

SS

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

The code sample documented here doesn't require XCMD. You will need to amend the code a bit so it doesn't also list all files in sub-folders but does list all files and not only the ones with a specific suffix.

View solution in original post

2 REPLIES 2
Patrick
Opal | Level 21

The code sample documented here doesn't require XCMD. You will need to amend the code a bit so it doesn't also list all files in sub-folders but does list all files and not only the ones with a specific suffix.

Kurt_Bremser
Super User

@sathya66 wrote:

 

We disabled XCMD so below logic won't work.


You did that ON PURPOSE?

How about cutting off your left pinky because you didn't need it today?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1184 views
  • 0 likes
  • 3 in conversation