How can I get file information using SQL Server?

Neil Pike

May 10, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Using the undocumented xp_getfiledetails procedure :-

create table #info ( 
alt_namevarchar(255) null, 
size_in_bytesint null, 
creation_date int null,
creation_timeint null,
last_written_dateint null,
last_written_timeint null,
last_accessed_dateint null,
last_accessed_timeint null,
attributesint null
)

insert #info exec master..xp_getfiledetails 'C:DirectoryFile.nam'

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like