Open zhou-en opened 10 months ago
import shutil import os def move_files(source_path, destination_path): for filename in os.listdir(source_path): source_file = os.path.join(source_path, filename) destination_file = os.path.join(destination_path, filename) shutil.move(source_file, destination_file) # Example usage source_directory = "/path/to/source" destination_directory = "/path/to/destination" move_files(source_directory, destination_directory)