How to find the file name in a folder

  • hi,

    How to find the file name in the folder if it exists or not.Daily text file is coming in the format ex:21-09-2011 i need to find whether the file exists or not for todays date.

  • If you're doing this in T-SQL, you can use xp_cmdshell (if it's enabled) to run a DOS or PowerShell script. However, this is the kind of thing SSIS is designed for, so I would recommend that you use that.

    John

  • can u tell hw to do in ssis

  • Not really. SSIS is a big subject. There are tutorials for getting yourself started in writing SSIS on the Microsoft website - I recommend you take a couple of those, then start writing a simple package. Of course, if you come across any particular issue while you're doing that, then please post back, and somebody will be delighted to help. Sorry I can't be more helpful than that.

    John

  • nhimabindhu (9/21/2011)


    hi,

    How to find the file name in the folder if it exists or not.Daily text file is coming in the format ex:21-09-2011 i need to find whether the file exists or not for todays date.

    Hi,

    Are you storing file name in DB??

    Shatrughna

  • no it is has to read from folder from system

  • Check this link.

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=30071

    Shatrughna

Viewing 7 posts - 1 through 6 (of 6 total)

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