.csv file properties via SQL | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

.csv file properties via SQL

Is it possible to access file properties such as the modified date via sql?
We have an export from one system that is stored in a .csv format and is updated on an iregular schedule. I can access and import the data into a table, but would like to avoid that overhead if possible. Seems the easiest way would be if I could access the modified date, store it in the db, and only import the data if the date has changed. Any ideas? Thanks.
Yes, but only via SQLDMO… Edit: xp_fileexists may work, but may also not provide enough information either… My choice would be to check it via SQLDMO.
You can try xp_getfiledetails if you want.
But all moderators won’t suggest you to use this handy xtended sp as its undocumented, no idea Y. the sp takes only one parameter the path of that file and will populate all the file properties.

xp_getfiledetails is exactly what I was looking for. Thank you very much.
And note that xp_getfiledetails is undocumented Madhivanan Failing to plan is Planning to fail
]]>