开发者

SSIS 2008 pb with file system task to delete a file

in my foreach loop container, I would like to delete the current processed file. I try as follows, but no file is deleted at the end, any idea??

SSIS 2008 pb with file system task to delete a file

Here is the prop开发者_Python百科erty of my loop , Current processed file comes from FileNameSimu variable

SSIS 2008 pb with file system task to delete a file

I would like to delete the current file

SSIS 2008 pb with file system task to delete a file


Make sure that the value in the variable User::FileNameSimu contains the file path like C:\Folder1\SubFolder2\File.txt and not just the file name File.txt

Please note the description of the property SourceVariable on File System Task. It expects a path.

SSIS 2008 pb with file system task to delete a file

On the Variables window, select the variable FilePath and press F4 to view the properties of the variable. Change the property EvaluateAsExpression to True and set the value @[User::Directory] + @[User::FileName] to the property Expression assuming that your variable Directory contains the folder path and the variable FileName contains the name. Make sure that the variable Directory ends with a backslash at the end like C:\temp\ and not like C:\temp. If it doesn't have a backslash at the end change your expression to @[User::Directory] + "\\" + @[User::FileName]

SSIS 2008 pb with file system task to delete a file

Or use the backslash in the expression

SSIS 2008 pb with file system task to delete a file

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜