Xp getfiledetails
From Wiki
You should not depend on this undocumented procedure because it might be deprecated in the future, but that it is good to use since it saves you some scripting or using terminal services
List the file detals for a file, the following fields are returned Alternate Name,Size,Creation Date, Creation, Time Last Written, Date Last Written, Time Last Accessed, Date Last Accessed Time and Attributes
- EXEC master..xp_getfiledetails 'C:\Program Files\Microsoft SQL Server\MSSQL\readme.txt'
Contributed by: --SQLDenis 15:34, 31 May 2008 (GMT)
Part of SQL Server Programming Hacks
Section Undocumented but handy


