A Python script to search for files by type within a specified directory on Windows and copy them to a destination folder. A practical utility to simplify tasks like organizing files, backups, and categorization.
- Search desktop (or any directory) recursively for files matching a specified extension (e.g.,
.pdf,.jpg,.xlsx). - Copy all found files to a user-defined destination folder.
- Customizable via simple command-line arguments.
- Lightweight, no external dependencies—pure Python.
- Python 3.x
- Built-in modules:
os,shutil,argparse
- Python 3.x installed on Windows systems.
python filemovement.py --source "C:\Users\YourName\Desktop" --ext ".pdf" --dest "D:\FileBackup\PDFs"- Handling file system traversal and pattern matching using Python modules.
- Building a clean command-line interface using argparse.
- Automating file operations safely with shutil.
- Add logging functionality to track files moved.
- Implement dry-run mode to preview actions.
- Add support for multiple file types or bulk extension filters.
- Develop a cross-platform GUI with tools like Tkinter or PyQt.