0
votes

Please advise on how to get Foreach Loop Contaiiner coordinated with the Execute Process Task so that only 2014-06-20 files are unzipped when my package user variable user::datePart = 2014-06-20.

source folder has 4 zip files with 2 different time stamps (sample):

    2014-06-20_24632_1403294308_settings_publisher.txt.zip
    2014-06-20_24632_1403294309_settings_campaign.txt.zip
    2014-06-21_24632_1403294308_settings_publisher.txt
    2014-06-21_24632_1403294309_settings_campaign.txt

What I've tried:

package variable user::datePart set to 2014-06-20

foreach loop container:

  • collection Foreach File Enumerater expressions: FileSpec =@[User::datePart] +"*.txt.zip"
  • collection Folder: C:\Users\me\Downloads\MarinmultipleZipped Files: *.txt.zip
  • collection Files: *.txt.zip
  • collection Retrieve file name: Fully qualified
  • variable mappings I set User::zippedFile set to 0

inside foreach loop container an Execute Process Task

  • Task property DelayValidation = True
  • Process executable = C:\Program Files (x86)\7-Zip\7z.exe,
  • expressions property Arguments = "e " +@[User::zippedFile]+ " " +"-C:\Users\me\Downloads\test2"

when I run this, it looks like success, but only the first two files are unzipping, and this is regardless of whether timestamp is 2014-06-20 or 2014-06-21 - which is very weird.

1

1 Answers

0
votes

try removing the '.txt' part like this:

 collection Foreach File Enumerater expressions: FileSpec =@[User::datePart] +"*.zip"