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

Hi ,

 

I have a text file which i need to read. However, i do not know the complete name of the file. 

 

For Example: 

The file name for today would be "hello_file_20190415_bc_10.txt" and file name for tomorrow would be "hello_file_20190416_bc_11.txt". 

 

Is it possible to find the name of today's file knowing that partial string "hello_file_20190415_bc_" is a defininte pattern. The problem here is the number 10 and 11 at the end of file name is not know to us and we need to read this file everyday. 

 

please help me how i can approach and solve this. 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

If only one file in the folder matches the patter "hello_file_20190415_bc_*.txt", you can use the wildcard in the infile-statement.

View solution in original post

1 REPLY 1
andreas_lds
Jade | Level 19

If only one file in the folder matches the patter "hello_file_20190415_bc_*.txt", you can use the wildcard in the infile-statement.

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
  • 1 reply
  • 832 views
  • 0 likes
  • 2 in conversation