Showing posts with label behaviour. Show all posts
Showing posts with label behaviour. Show all posts

Wednesday, March 7, 2012

File System Task exhibits strange behaviour ?

Hi All,

I've been doing some further testing on SSIS and come across what I consider strange behaviour of the FileSystemTask.

This is set to delete a file, using the file name input from a variable.

If the file doesn't exists I would expect the task to fail, but instead it does not. It succeeds ! I would expect this to fail if the file it attempts to delete is not found.

Can anyone duplicate this strange behaviour ?

Regards,

P R W.

I concur. It does not fail if the file does not exist, and I think it should, or rather it shoudl have the option to do so. I can see why it would also be very desirable to not fail, so for me an option to determine failure on file not found.

If you need it to fail, then a quick workaround for your package would be to add a second File task, and choose the Set attributes mode. That will fail if the file is not found.

|||

P R W wrote:

Hi All,

I've been doing some further testing on SSIS and come across what I consider strange behaviour of the FileSystemTask.

This is set to delete a file, using the file name input from a variable.

If the file doesn't exists I would expect the task to fail, but instead it does not. It succeeds ! I would expect this to fail if the file it attempts to delete is not found.

Can anyone duplicate this strange behaviour ?

Regards,

P R W.

Perhaps submit it as a bug at connect.microsoft.com?

-Jamie

|||

Hi Jamie,

I did a bit of testing with the FST.

If a file does not exist when copying, moving or renaming a file. The FST fails as expected with 'Could not find file....'

When deleting a file with FST though, if the file does not exist, the task succeeds.

This doesn't appear consistent to me and I have submitted as a bug at your suggestion.

Regards,

P R W.

|||

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=250600

Voted and Validated.

|||

Can I add to the strange behaviour of FST? I have the exact same task I added to a Foreach Loop and it just won't execute. I have it on Success for one task and on Success and Expresssion on another. The task is enabled. There are also no errors. The Foreach loop continues without the task running? I don't get it.

Cory

File System Task exhibits strange behaviour ?

Hi All,

I've been doing some further testing on SSIS and come across what I consider strange behaviour of the FileSystemTask.

This is set to delete a file, using the file name input from a variable.

If the file doesn't exists I would expect the task to fail, but instead it does not. It succeeds ! I would expect this to fail if the file it attempts to delete is not found.

Can anyone duplicate this strange behaviour ?

Regards,

P R W.

I concur. It does not fail if the file does not exist, and I think it should, or rather it shoudl have the option to do so. I can see why it would also be very desirable to not fail, so for me an option to determine failure on file not found.

If you need it to fail, then a quick workaround for your package would be to add a second File task, and choose the Set attributes mode. That will fail if the file is not found.

|||

P R W wrote:

Hi All,

I've been doing some further testing on SSIS and come across what I consider strange behaviour of the FileSystemTask.

This is set to delete a file, using the file name input from a variable.

If the file doesn't exists I would expect the task to fail, but instead it does not. It succeeds ! I would expect this to fail if the file it attempts to delete is not found.

Can anyone duplicate this strange behaviour ?

Regards,

P R W.

Perhaps submit it as a bug at connect.microsoft.com?

-Jamie

|||

Hi Jamie,

I did a bit of testing with the FST.

If a file does not exist when copying, moving or renaming a file. The FST fails as expected with 'Could not find file....'

When deleting a file with FST though, if the file does not exist, the task succeeds.

This doesn't appear consistent to me and I have submitted as a bug at your suggestion.

Regards,

P R W.

|||

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=250600

Voted and Validated.

|||

Can I add to the strange behaviour of FST? I have the exact same task I added to a Foreach Loop and it just won't execute. I have it on Success for one task and on Success and Expresssion on another. The task is enabled. There are also no errors. The Foreach loop continues without the task running? I don't get it.

Cory