|
import os |
|
import shutil |
|
|
|
|
|
files_to_move = [ |
|
"new_tools.parquet", |
|
"new_fpmmTrades.parquet", |
|
"fpmms.parquet", |
|
"fpmmTrades.parquet", |
|
] |
|
|
|
|
|
current_dir = os.getcwd() |
|
|
|
|
|
source_dir = os.path.join(current_dir, "data") |
|
dest_dir = os.path.join(current_dir, "tmp") |
|
|
|
|
|
def move_files(): |
|
|
|
if not os.path.exists(dest_dir): |
|
os.makedirs(dest_dir) |
|
|
|
for file_name in files_to_move: |
|
source_file = os.path.join(source_dir, file_name) |
|
dest_file = os.path.join(dest_dir, file_name) |
|
|
|
try: |
|
if os.path.exists(source_file): |
|
shutil.move(source_file, dest_file) |
|
print(f"Moved {file_name} successfully") |
|
else: |
|
print(f"File not found: {file_name}") |
|
except Exception as e: |
|
print(f"Error moving {file_name}: {str(e)}") |
|
|
|
|
|
if __name__ == "__main__": |
|
move_files() |
|
|