# -*- coding: utf-8 -*-
import chunk_file,os,sys
from os.path import join
def proc(directory):
	for root,dirs,files in os.walk(directory):
    		for file in files:
			base=file.split('.')[0]
			outDir=directory+"/chunked/"+os.path.relpath(root,directory)+"/"+base
			chunk_file.proc(os.path.relpath(join(root,file)),outDir)

if __name__ == "__main__":
	proc(sys.argv[1])
