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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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