import os
import shutil
import logging
from datetime import datetime
import configparser
import io
import codecs
import sys
import time
with codecs.open('config.txt','r', encoding='utf-8-sig') as f:
sample_config = io.StringIO(f.read())
config = configparser.ConfigParser()
config.read_file(sample_config)
now = datetime.now()
dt_string = now.strftime("%Y-%m-%d %H:%M:%S")
logge = time.strftime('%Y-%m-%d', time.localtime(time.time()))
logging.basicConfig(filename='log/'+logge + ".log ", filemode="a", level=logging.INFO)
target_folder = config.get("file","file_dir")
target_folder1 = config.get("file","file_dir1")