Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

HOW TO READ A ZIP FILE WITH THE SAME NAME FROM MULTIPLE FOLDERS AND UNZIP THEM

$
0
0

Hi, Iam relatively new to bids.Following is the scenario where i need help.

c:\archive has 3 sub folders

c:\archive\1     c:\archive\2        c:\archive\3

1 ,2, and 3(each of them)contains 11  files.  which are  10 zipped rar files(once unzipped  they are .txt files) and a date.txt file

Lets say 10 rar files are like cust.rar,prod.rar,sales.rar...and so on. I only want to consider cust.rar

Cust.rar contains the customer details and date contains the date for which the customer details and

the remaining 9 zipped files correspond to;something like business date.


I have to traverse through each folder and read only cust.rar and date.txt

>then unzip cust.rar

>populate customer table using the information in cust.txt(once its unzipped)

Note: 1: The cust file name ie.cust.rar is same in each folder(1,2,3), same is with date.txt

          2: customer table contains a column called businessdate which should  be taken from date.txt(date.txt corresponds

              to the  business date for that particular cust record)

customer table

cust_id  |  cust_name | cust_address |......  |businessdate

Please let me know whether i've missed to provide any information. Hoping to find some help asap:)

Thanks...


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>