# Import arcpy and set path to data
import os

# RAN FROM LAIKA
types = ['fgdb','shp']

for type in types:

	# # # # # master inputs
	basedir = "x:/Housing_data/PBG_change/data/" + type + "/"
	outdir = 'x:/Housing_data/PBG_change/zip/' + type + '/'

	dirs = os.listdir(basedir)
	for f in dirs:
		if f != 'zip':
			
			if type == 'fgdb': 
				f2 = f[:-4]
			else:
				f2 = f
		
			outzip = outdir + f2 +  "_" + type + ".zip"
			# print outzip
			call = "7z a " + outzip + " " + basedir + f
			print call
			os.system(call)
			# exit(0)