import os import shutil # Define the file names to move files_to_move = [ "new_tools.parquet", "new_fpmmTrades.parquet", "fpmms.parquet", "fpmmTrades.parquet", ] # Get the current working directory current_dir = os.getcwd() # Define source and destination paths source_dir = os.path.join(current_dir, "data") dest_dir = os.path.join(current_dir, "tmp") def move_files(): # Create tmp directory if it doesn't exist if not os.path.exists(dest_dir): os.makedirs(dest_dir) # Move each file 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()