This project is read-only.
Project Description
Retrieves and optionally sets properties on a file in the SQL Server Integration Services Control Flow. Available properties include file existence, size, read/write locks, creation/last access/last modification date, and file attributes.

Please visit the SSIS Community Tasks and Components project on CodePlex for more useful SSIS tools.

The Task is intended to read properties from a given file, and optionally update some of those properties.

The file name can be "hardcoded" (specified literally), specified by property expression, or supplied in a string-typed SSIS variable.
The Task can be configured to fail if the file doesn't exist, or it can be configured to always report Success and record whether or not the file exists in a boolean-typed SSIS variable.
The Task can attempt to open the file for reading and record whether it was successful or not into a boolean-typed SSIS variable. It can attempt a similar write test to check for exclusive file locks.
The Task can read the file's length, creation date, last access date, and last modification date and place those values into SSIS variables. It can also read attributes of the file - such as the ReadOnly and Hidden attributes - into boolean-typed SSIS variables.
The Task can also be configured to update the file's date properties (creation, last access, last modified), or attributes.

The following sample shows the Task configured to read properties from a file whose name is stored in the FileName SSIS variable. If the file exists, "true" will be stored in the FileExists variable, otherwise "false" will be stored. If the file exists, the Task will attempt to open it for reading - and record whether it was successful or not in the FileIsReadable variable. (The Task releases the file immediately.) The Task is also configured to read the file's length (size) into the FileSize variable, and store the last modification date into the LastModifiedDate variable.

Last edited Aug 6, 2009 at 9:24 AM by toddmcdermid, version 2