Browse Source

更新 'tz_crypto_bt.py'

回滚
master
tzquant_zq 1 year ago
parent
commit
7e12a3270b
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      tz_crypto_bt.py

+ 6
- 1
tz_crypto_bt.py View File

@ -49,7 +49,12 @@ for directory in directories_to_move:
# 检查源目录是否存在
if os.path.isdir(source_path):
# 使用shutil.move来移动目录
shutil.move(source_path, target_path)
if os.path.exists(target_path):
if os.path.isdir(target_path):
shutil.rmtree(target_path) # 删除整个目录及其内容
else:
os.remove(target_path) # 删除文件
shutil.move(source_path, target_path)
print(f"Moved {directory} to {target_path}")
else:
print(f"Directory {directory} does not exist in the current directory.")


Loading…
Cancel
Save