07-31-2013 08:04 AM
I want to get latest file from a FTP server where i had many files. I am able to get the single file by giving the exact name of the file.
Is there any way to get Latest file.
07-31-2013 09:44 AM
This is how we do it.
filename fname ftp "actual_file_name.txt"
infile fname missover;
07-31-2013 10:50 AM
The Ftp protocol has a lot of commands imbedded including directory commands.
SAS(R) 9.4 Statements: Reference (Filename FTP) See sample getting dir-listing
What is returned as listing is dependent of the server OS type and version.
As you have access to the file-server this can be tried.
Very often the FTP protocol is closed as thinking being harfull. SFTP is using the same approach. but then encrypted