Using File System task to move a file RRS feed

  • Question

  • Hi All,

    I am having a problem using the file system task, what I am trying to achieve is to move a file after it has been processed . I am using a For each loop container to process bunch of files but I want to remove the files that have been processed after every loop.To achieve this I added a File System Task after my data flow task and was using the same variable used in the for each loop container as my source variable but the package is not being validated and is gives the following error

    "variable used as the source or the destination is empty"

    Appreciate your help



    Friday, May 19, 2006 10:29 PM


All replies

  • You probably need to set DelayValidation property of the task to true.

    Usually you want to validate as soon as possible, but when you can’t because your validation depends on work of other tasks or variable expressions that will be set as result of other tasks execution – set DelayValidation to true.
    Saturday, May 20, 2006 8:08 AM
  • Thanks Michael, it works great.

    Appreciate your help

    Monday, May 22, 2006 3:56 PM
  • Dear All

    i have excel files as my source files..

    i am using a for each loop container and a data flow task and move file task..

    whenever an excel source connection the input file it loads it and Move file task moved the file to other directory.

    My problem is when i m using an excel source so it is kind off hardcoding the name of the excel and not picking *.xls which should be the when i run the process the first excel is read loaded and moved but as soon as second file has to be picked the "excel source" task fails saying couldnot find the file "oct.xls" (which actually has now moved to other folder) ..please suggest the way round...




    Monday, December 17, 2007 7:20 AM
  • Sid,


    You have to use the variable with the file name from the for each container in the File system task. See if this example helps:





    Monday, December 17, 2007 2:16 PM