import json import os def loadConfig(): with open('config.json','r') as fs: return fs.read() _json=loadConfig() def change(dir): _list=os.listdir("copy\\jni\\{0}".format(dir)) print(_list) def start(): _list=os.listdir('copy\\jni') for dir in _list: change(dir) print(_list) start()