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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1218 views
  • 0 likes
  • 3 in conversation