GETTING FILE PROPERTIES

  • Hi guys,

    i m working on a script to find old backups in all disk drives.

    i have reached a part where i have the full path of all backup files in temp table.

    but i m not able to get file date.i was trying to use xp_getfiledetails but it has been removed from 2005 onwards.

    so i was thinking of incorporating vbscript in t-sql as a function. like if we pass the path as a variable it will return the last modified date.

    Can it be done?

    Or is there any other option?

  • I have used logparser to do this, takes some time to get all the file details but you can insert into a table and use a while loop to get to all your servers. You can then query and try and find the old backups that may be laying about. Look at this post : http://www.sqlservercentral.com/Forums/Topic785529-1647-1.aspx and check out the proc utl_GetFileSystemDetail

    I modified it a little and can audit upwards of 90+ production server drives in a little over a day.

    Andrew

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply