Discussion:
test for an existent file and exit if not existent
(too old to reply)
NicoN
2010-05-27 07:48:13 UTC
Permalink
Hi NG,
My SSIS-package imports data from an Excel-file.
First of all, this file exists only every week,
so my SSIS has to test if the file is existent and exit if not.

My second question is how to set the exit-status for an SSIS-package
manually.


Can anybody help me ?
Todd C
2010-05-27 20:59:47 UTC
Permalink
I would use a For Each loop and tighten down the input mask so that it only
finds the ONE file. Everything that would be done with and to that file is
placed inside the loop.

Or you could set up COPY FILE file system task and if it fails, then exit
the package, if not, procede with what you need to do.

Or set up a Script Task to see if the file is there.

Or ...

I don't think you can manually specify exit codes for SSIS packages like you
can for stored procedures. It is what it is. 0 is always SUCCESS.
--
Todd C
MCTS SQL Server 2005
Post by NicoN
Hi NG,
My SSIS-package imports data from an Excel-file.
First of all, this file exists only every week,
so my SSIS has to test if the file is existent and exit if not.
My second question is how to set the exit-status for an SSIS-package
manually.
Can anybody help me ?
.
Loading...