BookmarkSubscribeRSS Feed
arunrami
Pyrite | Level 9

I am using following sas code to read the file from the window host directory , is there any way that I can get the recently modified date and file size along with that ?

 

 

filename indir ftp cd= "&directory_window." ls user="&user_name_window."
host= "&window_host." pass="&password_window." debug;



data Files(where=(File_Name like "%akj%" and index(File_Name,'csv')));
infile indir;
input File_Name $300.;
put _INFILE_;
run;

- SAR

1 REPLY 1
Tom
Super User Tom
Super User

You are not running a windows commad. You are using SAS's FTP engine.

 

What if you use your own Windows command to run an FTP command?  Then you can issue whatever FTP commands your want.

 

Note that the issue might be what the FTP server you are connecting to can actually produce.  Different FTP server implementations might offer different comamnds and options. Try connecting to the server using FTP and see what it supports.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 347 views
  • 0 likes
  • 2 in conversation