def find_file(dir_path, file_name, file_size, exclude_dir):
for root, dirs, files in os.walk(dir_path):
- if root == exclude_dir:
+ if root.startswith(exclude_dir):
continue
for f in files:
if f == file_name:
return root
return None
-def import_file(src_file_path, dst_file_path, move=False):
+def import_file(src_file_path, dst_file_path):
shutil.copyfile(src_file_path, dst_file_path)
src_stat = os.stat(src_file_path)
dst_stat = os.stat(dst_file_path)