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
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.
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!
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.