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