SQL Server Performance

.csv file properties via SQL

Discussion in 'General Developer Questions' started by wuwei26, Feb 9, 2006.

  1. wuwei26 New Member

    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.
  2. Haywood New Member

    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.
  3. ranjitjain New Member

    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.
  4. wuwei26 New Member

    xp_getfiledetails is exactly what I was looking for.

    Thank you very much.
  5. Madhivanan Moderator

    And note that xp_getfiledetails is undocumented

    Madhivanan

    Failing to plan is Planning to fail

Share This Page