A simple and effective Python script to organize your files into designated folders based on their file extensions.
FileSwift helps users efficiently manage their files by categorizing them into folders like Videos, Audios, Documents, Images, Archives, and more. You can also ungroup folders and move files back to a specified directory.
- Python 3.x: Ensure you have Python installed. Download it from python.org.
git clone https://github.com/Renzie2161/FileSwift
cd FileSwiftNo external libraries required; the script uses standard Python libraries.
To run the script, use the following command:
python fileswift.py- Enter the destination path where your files are located (or type
qto quit). - Custom JSON Configuration: Enter the path to your custom config file or press Enter to use the default.
- Confirmation: Confirm if you want to organize the files in the specified directory.
- Enter the folder path containing subfolders you wish to ungroup.
- Specify folder names to ungroup, separated by commas (or leave blank to ungroup all).
Create a JSON file with this structure:
{
"CategoryName": [".ext1", ".ext2"],
"AnotherCategory": [".ext3", ".ext4"]
}{
"Music": [".mp3", ".wav"],
"Documents": [".pdf", ".docx"],
"Images": [".jpg", ".png"]
}{
"Text and Document Files": [".txt", ".doc", ".docx", ".odt", ".pdf", ".rtf", ".tex", ".html", ".htm", ".md", ".epub", ".xml", ".json", ".csv"],
"Spreadsheet and Database Files": [".xls", ".xlsx", ".ods", ".csv", ".mdb", ".sqlite", ".db"],
"Image Files": [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif", ".webp", ".svg", ".raw", ".ico", ".heif", ".heic"],
"Audio and Video Files": [".mp3", ".wav", ".flac", ".ogg", ".aac", ".m4a", ".mp4", ".avi", ".mov", ".mkv", ".webm", ".flv", ".3gp", ".wmv"],
"Compressed and Archive Files": [".zip", ".tar", ".gz", ".rar", ".7z", ".bz2", ".xz", ".iso", ".img"],
"Executable and Script Files": [".exe", ".bat", ".sh", ".ps1", ".apk", ".app", ".jar", ".py", ".php", ".cgi", ".rb"],
"System and Configuration Files": [".ini", ".sys", ".dll", ".cfg", ".log", ".bak", ".tmp", ".config"],
"Font Files": [".ttf", ".otf", ".woff", ".eot"],
"Web and Internet Files": [".css", ".js", ".json", ".php", ".asp", ".aspx", ".xml", ".svg", ".rss", ".yml", ".yaml"],
"Virtualization and Disk Images": [".vmdk", ".vdi", ".vhd", ".vhdx", ".qcow2"],
"Programming and Development Files": [".cpp", ".h", ".java", ".cs", ".go", ".swift", ".rs", ".html", ".css", ".xml", ".json", ".sql"],
"Miscellaneous": [".torrent", ".srt", ".vtt", ".ics", ".pst", ".eml", ".epub", ".mobi", ".azw3"]
}Provide the path to your custom JSON file when prompted. The program will validate the structure.
Important
This program is no longer actively maintained or supported. Feel free to use it as-is, but there may be bugs or issues that have not been addressed. Consider using alternative solutions for similar functionality.
This project is licensed under the MIT License. See the LICENSE file for details.