title: How to capture flat file timestamps in SSMS
body: <p>This is my first attempt to ask a question on this forum. I'm currently running a local instance of SQL2008 R2 on my machine. I have Googled many different ways to get this exact question answered but had no luck so far.</p>
  
  <p>Simply put, I want to know how to capture a Windows flat file (foobar.txt) timestamp using t-sql code. I am totally new to MS SQL, and so far all I have run across is an undocumented sp called "xp_DirTree" which comes close but doesn't give me what I need. Is there a simple function that I'm overlooking here?</p>