I have the need to move a certain set of folders from one directory to another. I've found several posts that explain how to move files from one directory to another, but those didn't quite provide what I needed.
Essentially I have a text file that lists 700+ folder names. I need to iterate through those and starting at a certain "root" directory (E:\Folders) move those subfolders in E:\Folders to another root directory (F:\OtherDirectory). Here's what I have so
I hae a data flow task which is just a flat file connection which contains the list of folders. I then dropped a "For Each Loop" container onto the Control Flow. I then connect the data flow task to the For Each Loop Container.
I created a variable that has a scope of Packge with a datatype of String. The name is User::Folder.
Within the For Each Loop Editor, I've done the following:
In Collection, I chose "ForEach Item Enumerator" as the enumerator. For expression I chose the variable (User::Folder).
In Variable Mappings, I chose User::Folder as the variable with an index of 0.
Within the For Each Loop Container I drop a File System Task. Here are the settings for that:
IsDestinationPAthVariable = FALSE
DestinationConnection = connection to the new "root" directory
Operation = CopyDirectory
IsSourcePathVariable = FALSE
SourceConnection = connection to the origi
View Complete Post