[Webinar] Streamline your web hosting managementRegister Today


how to move files  that will be created at run time using file system task

Posted on 2010-03-30
Medium Priority
Last Modified: 2013-11-10
I want to move a file from a folder which will be empty at the beginning of the package but the data flow task will create a flat file in it and the File system Task willl execute after the data flow task . It has to move that file which was created by the dataflow task during the package execution to a new folder where there may or may not be files.

When we are configuring the file system task to move files, we have to initially provide the file that u want to move and the destination file too. In my case these files dont exist at the time of package creation but are rather created at run time.

My question is how can make File System work in this case as I am not able to provide source and destination files in the File System Task at the time of package creation as these files dont exist at that time but are created when this package is run

I dont want to use Sript task as I am not very familiar with Scripting.

Any other ideas??

Any Help will be greatly appreciated.
Question by:esotericmee
  • 2
  • 2
LVL 30

Expert Comment

by:Reza Rad
ID: 29173149
use variable for file system task
you can set variable with file name that generated dynamically, and file system task will use variable and find the correct file.

let me know if you need more details.

Author Comment

ID: 29211004
Yeah but would be the variable value initially? I am just beginning working with SSIS so it takes time for me to understand this..But i appreciate your help.. I need like more detailed ans if possible.. Thanks a lot
LVL 30

Accepted Solution

Reza Rad earned 2000 total points
ID: 29257583
yes you must set default value for variable to a valid file path, this is default value and doesn't use in runtime, but SSIS needs this default value for checking validation in design time of package,

double click on your file system task, you will see this property : IsSourcePathVariable  , set it to true, then you can set variable in SourceVariable property,
your variable must be string datatype, and it's better to be in package scope,

after dataflow, add a Script task, and set variable value there.


Author Closing Comment

ID: 32601277
IT worked

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question