BookmarkSubscribeRSS Feed
Gil_
Quartz | Level 8
Hi I want to import a file that will be automate the file has the day the file ran for example pop 05-14-17
How do I auto import where I need the most current file that is dated ? Thanks
2 REPLIES 2
Reeza
Super User

You find a way to identify the most recent file then import that file. How do you currently identify the most recent file?

You need to provide WAY more information if you want anything beyond this. 

 

Also, search on here, there's been some very recent posts asking almost the identical question, based on a guess of what you're trying to do. But you can't code of guesses. 

Gil_
Quartz | Level 8
My import function looks like this

Proc import out =bird
Datafile="\\bird\bird.xlsx"
DBms=excel replace;
Sheet="bird";
Getnames=yes;
Rin;

The files currently looks like this I would need the most current one
Bird-05-14-17.xlsx
Bird-05-13-17.xlsx
Bird-05-12-17.xlsx

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
  • 904 views
  • 0 likes
  • 2 in conversation