This Python script foldertoiso.py
converts a specified folder into an ISO file using the shutil
library. Here's a brief overview of its functionality and usage:
To convert a folder to an ISO file, run the script with two command-line arguments:
<path to folder>
: Path to the folder you want to convert.<path to iso>
: Desired path and filename of the resulting ISO file (without the .iso extension).
python3 foldertoiso.py example_folder/ example_iso
- Python 3.x
shutil
library (standard library in Python)
- The script compresses the specified folder into a ZIP archive using shutil.make_archive.
- It then renames the ZIP archive with a .iso extension to simulate an ISO file.
- Finally, it notifies the user of the successful conversion or prints an error message if any issues occur.
- Ensure that the folder you specify exists and the paths are correct.
- The resulting file is a ZIP archive renamed with a .iso extension, not a true ISO 9660 image.
This program is provided as-is, without warranties or conditions of any kind, either express or implied. By using this program, you agree that the author is not responsible for any damage that may occur as a result of its use.
This script is released under the MIT License. See LICENSE file for more details.
Filip Rokita
Website: www.filiprokita.com