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??
Here is the prop开发者_Python百科erty of my loop , Current processed file comes from FileNameSimu variable
I would like to delete the current 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.
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]
Or use the backslash in the expression
精彩评论