locked
problem in foreach loop in SSIS RRS feed

  • Question

  • I want to transfer one folder which have 10 files from one server to another server using SSIS

    I have used Foreach loop inside it i have used File System task.

    but alwayz getting error

    Error: 0xC002F304 at File System Task, File System Task: An error occurred with the following error message: "The file 'C:\Documents and Settings first\second.txt' already exists.".

    but in my second server inside second folder no files are present .

    provide me some suggesstion or solution or any link .

    There may be case where i can be wrong in settings so i request you to provide me links or examples which will be easy way to understand.

    I just want to tranfer a folder containing 10 files to another server

    Wednesday, July 6, 2011 11:09 AM

Answers

  • When moving between servers make sure you have (and the package in prod) the proper permissions to move the files.

    This is a very good post on how to move files in one shot (the post also explains how to rename the files so skip this step): http://www.rafael-salas.com/2007/03/ssis-file-system-task-move-and-rename.html


    Arthur My Blog
    By: TwitterButtons.com
    Wednesday, July 6, 2011 1:53 PM

All replies

  • Read the path properly it is targeting to a local machine please check the destination address

    --------------------------------------------------------

    Surender Singh Bhadauria

     

    Wednesday, July 6, 2011 11:15 AM
  • ya i have given laocal machine address as a source this source is having a folder contaisa 10 files

     and in destination i have provided another address.but same error is comming again.

    can u provide me some link


    I know that there is problem in settings but i m unable to sort the error.

    I am askin question that if u have to

     tranfer a folder containing 10 files to another server what process you would have suggested using SSIS


    Wednesday, July 6, 2011 11:22 AM
  • you must be using a variable for destination path so

    do one thing add a script task and  add the folowing

    MsgBox(Dts.Variables("Destination").Value.ToString())
    

    And execute to see the destination path


    --------------------------------------------------------

    Surender Singh Bhadauria

     

    Wednesday, July 6, 2011 11:31 AM
  • Srry but i m not getting wht exactly to do please provide me some proper link or example

    question that if u have to

     tranfer a folder containing 10 files to another server using SSIS

     

    Wednesday, July 6, 2011 12:23 PM

  • --------------------------------------------------------

    Surender Singh Bhadauria

     

    Wednesday, July 6, 2011 12:34 PM
  • Thanks Surender,

    for this example.but i am getting this error

    Error: 0xC002F304 at File System Task, File System Task: An error occurred with the following error message: "Logon failure: unknown user name or bad password.
    ".

    I think for the second server where i have to copy my folder user name is required for that server

    cau you please tell me that where i have to put user name and password for this error

    Wednesday, July 6, 2011 1:21 PM
  • When moving between servers make sure you have (and the package in prod) the proper permissions to move the files.

    This is a very good post on how to move files in one shot (the post also explains how to rename the files so skip this step): http://www.rafael-salas.com/2007/03/ssis-file-system-task-move-and-rename.html


    Arthur My Blog
    By: TwitterButtons.com
    Wednesday, July 6, 2011 1:53 PM