Python Folder Sync GUI – Hacker Style File Mirroring Tool | FuzzuTech

 Demo :


Click Video πŸ‘‡πŸ‘‡πŸ‘‡


























πŸ” Features :

  • πŸ“ Folder Sync in 1 Click

  • πŸ–₯️ Modern CustomTkinter GUI

  • 🧠 Threaded for Freeze-Free Experience

  • 🚫 No Internet Required – 100% Offline

  • ⚡ Built for Developers & Hackers


Code :


import os

import shutil

import customtkinter as ctk

from tkinter import filedialog, messagebox

import threading


ctk.set_appearance_mode("System")

ctk.set_default_color_theme("blue")


app = ctk.CTk()

app.title("Folder Sync Tool - FuzzuTech")

app.geometry("500x400")


def choose_source():

    path = filedialog.askdirectory()

    if path:

        source_entry.delete(0, 'end')

        source_entry.insert(0, path)


def choose_target():

    path = filedialog.askdirectory()

    if path:

        target_entry.delete(0, 'end')

        target_entry.insert(0, path)


def sync_folders():

    source = source_entry.get()

    target = target_entry.get()


    if not source or not target:

        messagebox.showerror("Error", "Both source and target folders are required.")

        return


    status_label.configure(text="Syncing...", text_color="orange")

    sync_button.configure(state="disabled")


    def sync():

        try:

            for foldername, subfolders, filenames in os.walk(source):

                rel_path = os.path.relpath(foldername, source)

                dest_path = os.path.join(target, rel_path)

                os.makedirs(dest_path, exist_ok=True)


                for file in filenames:

                    src_file = os.path.join(foldername, file)

                    dst_file = os.path.join(dest_path, file)

                    shutil.copy2(src_file, dst_file)

            status_label.configure(text="Sync Completed!", text_color="green")

        except Exception as e:

            status_label.configure(text=f"Error: {e}", text_color="red")

        finally:

            sync_button.configure(state="normal")


    threading.Thread(target=sync).start()


# GUI Elements

ctk.CTkLabel(app, text="Source Folder:").pack(pady=10)

source_entry = ctk.CTkEntry(app, width=400)

source_entry.pack()

ctk.CTkButton(app, text="Browse", command=choose_source).pack(pady=5)


ctk.CTkLabel(app, text="Target Folder:").pack(pady=10)

target_entry = ctk.CTkEntry(app, width=400)

target_entry.pack()

ctk.CTkButton(app, text="Browse", command=choose_target).pack(pady=5)


sync_button = ctk.CTkButton(app, text="Sync Folders", command=sync_folders)

sync_button.pack(pady=20)


status_label = ctk.CTkLabel(app, text="")

status_label.pack(pady=10)


app.mainloop()

Comments

Popular posts from this blog

πŸš€ Simple Login & Registration System in Python Tkinter πŸ“±

πŸ”₯ Advanced MP3 Music Player in Python | CustomTkinter + Pygame | Free Source Code

πŸš€ Create a Python Screen Recorder with Audio (Complete Code)