SSIS Package To Check for a Flat file And Return True/False

Hi Experts, I have to create an SSIS Package to Check If a Specific File Exists in a Folder. If this File Exists then it should return True and if it dosent exist it should return False. What I have to do actually is, I have to Schedule a Sql Agent job in that the first step is to check if a file (filename_04152009_1515) exists in a folder on my network, and if this file exists I have to Proceed to the next step and if this file dosent exist, I have to send a mail to the User telling that the data file is not there, please help me Thanks in Advance.
KuldeepReddyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brad2575Commented:
Can the generation of this file take some time?  If so you can check to see if it exists but if it is still being generated/created and/or open/locked by someone just checking to see if it exists will not work.

If it is still being generated or locked your process when run will error out (I know I have a similar issue trying to see if a file is done or not).

Just something to keep in mind when doing this.


0
KuldeepReddyAuthor Commented:
There are some jobs that runs every day.
Job1: This job gets some text files from an external source and puts these files in folder on the network
Job2: This is an SSIS job that gets data from the thext files and loads into some tables
Job3: A report is run on the SSRS and an Excel file will be shaved  on my shared folder.
Job4: this has to be created now, What I want to do is I just want to check If a specific file exists in the folder(that came in through Job1) CASE1: if this file exists, I want to run a batch job that renames my report on the shared drive and then email  out the report from my shared folder.
CASE2: If the Specific file is not there in the Folder (that came in through Job1) I want to send out an email that says "Theres no data for the report".
The Purpose of checking wether a specific file exists in the folder is just to confirm that the report has data since data in this file is used for the report.
0
PedroCGDCommented:
Check the attached project I made for you.
Add the attached package to an existent SSIS colution, update the connection in Connection Managers and run...

Helped?
Regards,
Pedro
www.pedrocgd.blogspot.com
SSIS-Interface.JPG
FileFound.JPG
filename-04152009-1515.txt
Package-EE104-dtsx.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.