core.py:moveFailedFolder() just the same action as in ADC_function.py

This commit is contained in:
lededev
2021-06-26 01:55:26 +08:00
parent f41c965f40
commit eb1d577f00
2 changed files with 17 additions and 17 deletions

View File

@@ -120,12 +120,13 @@ def create_data_and_move(file_path: str, c: config.Config, debug):
else:
try:
print("[-]Move [{}] to failed folder".format(file_path))
shutil.move(file_path, conf.failed_folder() + "/")
shutil.move(file_path, conf.failed_folder() + "/" + file_name)
except Exception as err:
print('[!]', err)
def create_data_and_move_with_custom_number(file_path: str, c: config.Config, custom_number):
file_name = os.path.basename(file_path)
try:
print("[!]Making Data for [{}], the number is [{}]".format(file_path, custom_number))
core_main(file_path, custom_number, c)
@@ -136,11 +137,11 @@ def create_data_and_move_with_custom_number(file_path: str, c: config.Config, cu
if c.soft_link():
print("[-]Link {} to failed folder".format(file_path))
os.symlink(file_path, conf.failed_folder() + "/")
os.symlink(file_path, conf.failed_folder() + "/" + file_name)
else:
try:
print("[-]Move [{}] to failed folder".format(file_path))
shutil.move(file_path, conf.failed_folder() + "/")
shutil.move(file_path, conf.failed_folder() + "/" + file_name)
except Exception as err:
print('[!]', err)