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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.
Ready to level-up your skills? Choose your own adventure.