mod
import shutil import os # Function to move files from source to destination def move_files(source_folder, destination_folder): # Ensure the source folder exists if not os.path.exists(source_folder): print("Source folder '%s' does not exist." % source_folder) return # Ensure the destination folder exists; create it if not if not os.path.exists(destination_folder): os.makedirs(destination_folder) # Get a list of all files in the source folder files = os.listdir(source_folder) # Loop through the files and move them to the destination folder for file in files: source_path = os.path.join(source_folder, file) destination_path = os.path.join(destination_folder, file) # Use shutil.move to move the file ...