Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Modified Date of a file

    Hi All,

    Think this must be pretty easy to do but can't find the commands anywhere... how can i use T-SQL to find the modified date of a particular file (say c:\temp\test.out) ?

    Thanks

    John

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    You could use extended sp xp_getfiledetails or xp_cmdshell to check info about file. If you need use this information late - save it in table.


    insert mytable--table has to have structure according to sp recordset.
    master..xp_cmdshell "dir c:\myfile.zip"

    insert mytable--table has to have structure according to sp recordset.
    master..xp_getfiledetails "c:\myfile.zip"

  3. #3
    Join Date
    Oct 2003
    Posts
    2
    Thanks Snail, worked a treat

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •