File System Task

  • Hi all.

    I have a package that imports files into a database.

    After I finish importing files i have to move them to another folder.

    I've got a For Each loop which loops thru all *.dat files in \Server1\Test\Updates.

    Inside For Each loop i've got a FileSystemTask with these settings

    IsDestinationpathvariable = true

    destinationvariable = User::SProcess

    Operation = Move file

    Issourcepathvariable = true

    sourcevariable = User::SUpdate

    I've got 2 string variables Supdate and Sprocess (scope=project) which point to \Server1\Test\Updates and \Server1\Test\Processed.

    I shared both folders and gave full control to a login that executes this package.

    I get this error message:

    [File System Task] Error: An error occurred with the following error message: "Could not find file '\\Server1\Test\Updates'.".

    What am i doing wrong.

     

    Alex S
  • Yes it can be pretty confusing...

    When the FileSystem Task asks for a Source Connection ("Specifies the connection of the source files"), it is actually asking for a single file not a directory.

    The way I did it was to:

    1) in the ForEach loop set the folder to "\Server1\Test\Updates" and Files = "*.dat" as you did

    2) still in the ForEach loop, you need to put the value in the User::SUpdate variable using the "Variable mappings" tab.  That way the variable will hold the current file for each iteration.

    3) then use the User::SUpdate variable as SourceVariable.

     

    Leonce

  • Thank You Leonce

    That worked but then i ran into another error "Access to data path denied".

    Finally after some reading i found out.

    When i share any folder "\Server1\Test"

    I have to remove everyone from the permissions tab (cause it is set to readonly by default)

    And add only the login that SSIS uses and give full control.

     

     

     

    Alex S
  • Hi,

    i'm facing the same problem.

    I don't know how to give access only to SSIS packages.

    could please explain me that?

    Thanks

    regards

    viji

  • Viji, this question is not about permissions to packages, but permissions for a task in a package that needs to execute.

    Please start a new thread in this forum for your question and give more details.

  • Hi Steve,

    I did the same.

    and following is the link to that.

    http://www.sqlservercentral.com/Forums/Topic625677-364-1.aspx

    Thanks,

    Regards

    Viji

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply