This batch script is designed to automatically organize a collection of ZX Spectrum game files and related media. It sorts various file types into appropriate directories, making it easier to manage large collections of ZX Spectrum content.
Features
- Organizes files into categories: games, pokes, images, documents, audio, and miscellaneous
- Handles common ZX Spectrum file formats (.tap, .tzx, .z80, .sna, .rzx, .dsk) + poke files (.pok)
- Sorts image files (.jpg, .png, .gif, .bmp)
- Manages document files (.txt, .pdf)
- Organizes audio files (.mp3, .ay)
- Handles ZIP archives based on their content
- Creates a detailed log file of all operations
Place the script (organize_zx_spectrum.bat
) in the same directory as your ZX Spectrum files.
Double-click the script to run it.
The script will create an Organized_ZX_Spectrum
folder with the following subdirectories:
games
pokes
images
documents
audio
misc
Files will be moved to their respective folders based on their file extensions.
A log file (organize_log.txt
) will be created, detailing all actions taken by the script.
File Type Sorting
Games: .tap, .tzx, .z80, .sna, .rzx, .dsk
Pokes: .pok
Images: .jpg, .png, .gif, .bmp
Documents: .txt, .pdf
Audio: .mp3, .ay
Misc: All other file types
ZIP files are sorted based on their content (e.g., tap.zip goes to the games folder).
There will be no output until the script finishes due to limitations of batch files. I'm not sure how to fix this.
The script will not move itself, preventing any issues that could arise from self-deletion.
Always backup your files before running organizational scripts like this one.
Check the log file (organize_log.txt) for details on file movements and any potential issues.
You can easily modify the script to handle additional file types or change the sorting logic. Look for the if /I "!EXT!"==".xxx" lines in the script and add or modify as needed.
Feel free to fork this script and adapt it to your needs. If you make improvements, consider creating a fork and posting a message here to benefit the community.
This script is released under the (AGPLv3 License)[https://www.gnu.org/licenses/agpl-3.0.en.html#license-text].
Happy organizing, and enjoy your newly sorted ZX Spectrum collection!