Showing posts with label Latest File. Show all posts
Showing posts with label Latest File. Show all posts

Monday, 13 April 2015

SQL script to find the latest file in the folder

With the below given script one would be able to find out the latest modified file of specific type (extension)
in a directory

To achieve this, XP_CMDSHELL is used to list the files from the directory. Then extension of the file is provided
in a select statement to retrieve the file which has latest modified timestamp on it

bloggerwidgets