The purpose of a variale is to move the data from one task to another or one package to another.(Dynamic connections)
Looping through the files .
There are 2 types of Variables in SSIS.
1. System Variables / Predefined
2. User defined Variables.
Coming to System Variables
-Pre-defined
-Read only
-Stores Package Executed info.
-Present in NameSpace : System
-Scope: Local (task) or Global (Package)
Coming to User Variables
-User Defined
-Read and Write
-Presented in Name Space : User
-Scope : Local (task) or Global (Package).
You can change the scope of the Varaible from the highlighted area in the bottom of the Tab(as highlighted)
Select Name from Emp where Empid = 1
The Advantage of using a variable is you can easily change the file path and then the Variable Value is update and now you get the folder created in another File Path.