title: SSIS Storing File Name as a Variable
body: <p>I am very new to SSIS. Like, less than a month of exp using it new.</p>
  
  <p>Here is what I want to do:</p>
  
  <p>In the "File name:" section of the File File Connection Manager editor, I want to replace this with a variable. i.e. variable\name_of_file.txt.</p>
  
  <p>In the variables section, I have my path for the value. I expect this to change depending on who is using the ssis package.</p>
  
  <p>The variable value will be "c:\users\john_doe\downloads\"</p>
  
  <p>How do I get this variable into the fiat file connection manager editor step in the file name location?</p>
  
  <p>In other words, my variable name is "file_output_path", so in the flat file connection manager, would I just set the file name to <code>@file_output_pathtest.txt</code> ?</p>
  
  <p><strong>Edit #1:</strong></p>
  
  <p>I edited the expression value in the file connection, but I'm running into some problems.</p>
  
  <p>Here is how I have everything set up:</p>
  
  <p><a href="https://i.stack.imgur.com/SOtv3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SOtv3.png" alt="variable_list"></a>
  <a href="https://i.stack.imgur.com/KHzhD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KHzhD.png" alt="flat_file_connection_manager_setup"></a>
  <a href="https://i.stack.imgur.com/GpmTs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GpmTs.png" alt="setup"></a>
  Here is the error message that I am getting:</p>
  
  <p>SSIS package </p>
  
  <blockquote>
    <p>"C:\Users\xxx\Downloads\creating_validation_output\orphaned_plan_services_null_provider\orphaned_plan_services_null_provider\orphaned_plan_services_null_provider.dtsx"
    starting. Information: 0x4004300A at Data Flow Task, SSIS.Pipeline:
    Validation phase is beginning. Warning: 0x80049304 at Data Flow Task,
    SSIS.Pipeline: Warning: Could not open global shared memory to
    communicate with performance DLL; data flow performance counters are
    not available.  To resolve, run this package as an administrator, or
    on the system's console. Information: 0x40043006 at Data Flow Task,
    SSIS.Pipeline: Prepare for Execute phase is beginning. Information:
    0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is
    beginning. Information: 0x402090DC at Data Flow Task, Flat File
    Destination [14]: The processing of file
    <strong>"C:\Users\xxx\Downloads\creating_validation_output\orphaned_plan_services_null_provider\test.txt\test.txt\test.txt"</strong>
    has started. Warning: 0x80070003 at Data Flow Task, Flat File
    Destination [14]: The system cannot find the path specified. Error:
    0xC020200E at Data Flow Task, Flat File Destination [14]: Cannot open
    the datafile
    <strong>"C:\Users\xxx\Downloads\creating_validation_output\orphaned_plan_services_null_provider\test.txt\test.txt\test.txt".</strong>
    Error: 0xC004701A at Data Flow Task, SSIS.Pipeline: Flat File
    Destination failed the pre-execute phase and returned error code
    0xC020200E. Information: 0x402090DD at Data Flow Task, Flat File
    Destination [14]: The processing of file
    <strong>"C:\Users\xxx\Downloads\creating_validation_output\orphaned_plan_services_null_provider\test.txt\test.txt\test.txt"</strong>
    has ended. Information: 0x4004300B at Data Flow Task, SSIS.Pipeline:
    "Flat File Destination" wrote 0 rows. Information: 0x40043009 at Data
    Flow Task, SSIS.Pipeline: Cleanup phase is beginning. Task failed:
    Data Flow Task Warning: 0x80019002 at
    orphaned_plan_services_null_provider: SSIS Warning Code
    DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but
    the number of errors raised (2) reached the maximum allowed (1);
    resulting in failure. This occurs when the number of errors reaches
    the number specified in MaximumErrorCount. Change the
    MaximumErrorCount or fix the errors. SSIS package
    "C:\Users\xxx\Downloads\creating_validation_output\orphaned_plan_services_null_provider\orphaned_plan_services_null_provider\orphaned_plan_services_null_provider.dtsx"
    finished: Failure. The program '[9320] DtsDebugHost.exe: DTS' has
    exited with code 0 (0x0).</p>
  </blockquote>
  
  <p>I don't understand where the </p>
  
  <blockquote>
    <p>\test.txt\test.txt\test.txt</p>
  </blockquote>
  
  <p>is coming from.</p>