• GSquared (1/23/2009)


    Yes, this can be done with SSIS.

    Declare a variable, set up a For...Each...Next loop that goes through the files in the folder, and assign the file name to the variable. Use the variable as part of a file-system-object command to create a folder. Very straightforward.

    I am getting a "Directory already exist" error message. Here's what I'm doing:

    In the Foreach Loop in the Collection I have in the Folder, the path of where my file is "E:\test" and in the Files i have "*.zip" (without the double quotes). Variable Mappings set the variable to the empty variable, for example, User::ZipFileName variable. When the Foreach Loop gets executed, the *.zip I specified in the collection should get stored in the User::ZipFileName, correct?

    Now inside the Foreach Loop container, I created a File System Task with the following criteria: UseDirectoryIfExists = True, Operation = Create directory, IsSourcePathVariable = True, SourceVariable = User::FileSourcePath (which is the "E:\test"). Nothing is in the expressions. Is this correct?

    Am I missing something else?