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?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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