zhou-en / pyppeteer-scraper

Web scraper using pyppeteer
0 stars 0 forks source link

Sample Code for moving files #6

Open zhou-en opened 10 months ago

zhou-en commented 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)