none
File System Task - Moving Files RRS feed

  • Question

  • Hello all. New to SSIS and trying to move files between:

     

    Source:       c:\temp\1\*.txt

    Destination:  c:\temp\2\

     

     

    Added VARIABLE [FileName] String, Scope = Package

    Added SEQUENCE CONTAINER

    Added FOREACH LOOP CONTAINER

          [General] No Change

          [Collection] Enumerator = Foreach File Enumerator

                       Folder = C:\TEMP\1

                       Files = *.txt

                       Retrieve File Name = Fully qualified

          [Variable Mappings] User::FileName

          [Expressions] No Change

    Added FILE SYSTEM TASK

          [General] IsDestinationPathVariable = False

    DestinationConnection = Created a new destination.

                                            I specified existing Directory at c:\temp\2

                    OverwriteDestination = False

                    Operation = Move File

                    IsSourcePathVariable = True

                    SourceVariable = User::FileName

    When I run the package, I get an error:

    Error at File System Task: Variable "FileName" is used as a source or destination and is empty.

    Any ideas?

    Thursday, January 13, 2011 4:28 PM

Answers

  • Hello,

    Provide any false value to your FileName Variable, Go to variables then you will see your FileName Variable, in Value put anything , like a, test or any character.

     

    Double click the File system task and error will be gone.

    thanks

     

    • Marked as answer by TarugoKing Thursday, January 13, 2011 5:05 PM
    Thursday, January 13, 2011 4:32 PM

All replies

  • Hello,

    Provide any false value to your FileName Variable, Go to variables then you will see your FileName Variable, in Value put anything , like a, test or any character.

     

    Double click the File system task and error will be gone.

    thanks

     

    • Marked as answer by TarugoKing Thursday, January 13, 2011 5:05 PM
    Thursday, January 13, 2011 4:32 PM
  • Thank you!!! That fixed it but it really made me scratch my head.
    Thursday, January 13, 2011 4:48 PM