{"id":27642471,"url":"https://github.com/p0dalirius/pysortwindowsisos","last_synced_at":"2025-08-21T01:06:57.061Z","repository":{"id":41381689,"uuid":"449778943","full_name":"p0dalirius/pySortWindowsISOs","owner":"p0dalirius","description":"Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.","archived":false,"fork":false,"pushed_at":"2024-10-08T11:29:00.000Z","size":176,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T05:41:33.203Z","etag":null,"topics":["build","iso","parse","python","windows"],"latest_commit_sha":null,"homepage":"https://podalirius.net/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p0dalirius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"p0dalirius","patreon":"Podalirius"}},"created_at":"2022-01-19T16:55:01.000Z","updated_at":"2025-06-23T08:30:17.000Z","dependencies_parsed_at":"2024-06-26T07:51:56.191Z","dependency_job_id":"07ae0b34-e383-4cae-a8fb-72d600a9e690","html_url":"https://github.com/p0dalirius/pySortWindowsISOs","commit_stats":null,"previous_names":["p0dalirius/pysortwindowsisos"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/p0dalirius/pySortWindowsISOs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FpySortWindowsISOs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FpySortWindowsISOs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FpySortWindowsISOs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FpySortWindowsISOs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p0dalirius","download_url":"https://codeload.github.com/p0dalirius/pySortWindowsISOs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FpySortWindowsISOs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271410703,"owners_count":24754777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","iso","parse","python","windows"],"created_at":"2025-04-23T23:56:10.381Z","updated_at":"2025-08-21T01:06:57.041Z","avatar_url":"https://github.com/p0dalirius.png","language":"Python","funding_links":["https://github.com/sponsors/p0dalirius","https://patreon.com/Podalirius"],"categories":[],"sub_categories":[],"readme":"![](./.github/banner.png)\n\n\u003cp align=\"center\"\u003e\n  Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.\n  \u003cbr\u003e\n  \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/p0dalirius/SortWindowsISOs\"\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=podalirius_\" title=\"Follow\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/podalirius_?label=Podalirius\u0026style=social\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.youtube.com/c/Podalirius_?sub_confirmation=1\" title=\"Subscribe\"\u003e\u003cimg alt=\"YouTube Channel Subscribers\" src=\"https://img.shields.io/youtube/channel/subscribers/UCF_x5O7CSfr82AfNVTKOv_A?style=social\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\n\n![](./.github/before_after.png)\n\n\n## Features\n\n - [x] Parse multiple ISO files from a directory.\n - [x] Detect the Windows build number and OS language.\n - [x] Sort and rename the ISO files in folders by OS major and minor builds.\n\n## Examples\n\n - **Automatically sort and rename the isos from a directory by major and minor build numbers.**\n    ```\n    ./SortWindowsISOs.py --iso-dir ./isos/ --archive-dir ./archive/\n    ```\n \n - **Only get the major and minor build numbers of an ISO.**\n    ```\n    ./SortWindowsISOs.py --iso ./isos/Win10_21H1_x64_English.iso\n    ```\n\n## Usage\n\n```\n$ ./SortWindowsISOs.py -h\nusage: SortWindowsISOs.py [-h] (-i ISO | -d ISO_DIR) [-a ARCHIVE_DIR] [-v]\n\nExtract Windows Build number from ISO files. v1.1\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i ISO, --iso ISO     Path to iso file.\n  -d ISO_DIR, --iso-dir ISO_DIR\n                        Directory containing multiple ISOs to parse.\n  -a ARCHIVE_DIR, --archive-dir ARCHIVE_DIR\n                        Archive dir. (default: False)\n  -v, --verbose         Verbose mode. (default: False)\n\n```\n\n## How it works\n\nIn order to extract the Windows version from an ISO, we first need to mount the ISO file and open its content. In the ISO, there is a `./sources/` folder containing a `Windows imaging (WIM) image` in `./sources/boot.wim`. When we uncompress this archive, we get a lot of files, but one file at the root of the archive stands out: `'[1].xml'`.\n\n```\nboot$ ls -lha\ntotal 52K\ndrwxrwxr-x 5 podalirius podalirius 4,0K janv. 18 00:17  .\ndrwxrwxr-x 4 podalirius podalirius 4,0K janv. 18 00:17  ..\ndrwx------ 8 podalirius podalirius 4,0K mars  19  2019  1\n-rw-rw-r-- 1 podalirius podalirius 3,9K janv. 18 00:16 '[1].xml'\ndrwx------ 8 podalirius podalirius 4,0K mars  19  2019  2\ndrwx------ 2 podalirius podalirius  32K janv. 18 00:16 '[DELETED]'\n```\n\nThis file is a XML file containing information about the images contained inside the `./sources/install.wim` file. It contains all the information we need to know which major or minor build this ISO file is. Here is an extract of the [`'[1].xml'`](./example/%5B1%5D.xml) file:\n\n```xml\n\u003cWIM\u003e\n    \u003cTOTALBYTES\u003e4461218778\u003c/TOTALBYTES\u003e\n    \u003cIMAGE INDEX=\"1\"\u003e\n        ...\n        \u003cWINDOWS\u003e\n            \u003cARCH\u003e9\u003c/ARCH\u003e\n            \u003cPRODUCTNAME\u003eMicrosoft® Windows® Operating System\u003c/PRODUCTNAME\u003e\n            \u003cEDITIONID\u003eServerStandardEval\u003c/EDITIONID\u003e\n            \u003cINSTALLATIONTYPE\u003eServer Core\u003c/INSTALLATIONTYPE\u003e\n            \u003cSERVICINGDATA\u003e\n                \u003cGDRDUREVISION\u003e0\u003c/GDRDUREVISION\u003e\n                \u003cPKEYCONFIGVERSION\u003e10.0.17763.719;2016-01-01T00:00:00Z\u003c/PKEYCONFIGVERSION\u003e\n                \u003cIMAGESTATE\u003eIMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE\u003c/IMAGESTATE\u003e\n            \u003c/SERVICINGDATA\u003e\n            \u003cPRODUCTTYPE\u003eServerNT\u003c/PRODUCTTYPE\u003e\n            \u003cPRODUCTSUITE\u003eEnterprise\u003c/PRODUCTSUITE\u003e\n            \u003cLANGUAGES\u003e\n                \u003cLANGUAGE\u003een-US\u003c/LANGUAGE\u003e\n                \u003cDEFAULT\u003een-US\u003c/DEFAULT\u003e\n            \u003c/LANGUAGES\u003e\n            \u003cVERSION\u003e\n                \u003cMAJOR\u003e10\u003c/MAJOR\u003e\n                \u003cMINOR\u003e0\u003c/MINOR\u003e\n                \u003cBUILD\u003e17763\u003c/BUILD\u003e\n                \u003cSPBUILD\u003e737\u003c/SPBUILD\u003e\n                \u003cSPLEVEL\u003e0\u003c/SPLEVEL\u003e\n                \u003cBRANCH\u003ers5_release\u003c/BRANCH\u003e\n            \u003c/VERSION\u003e\n            \u003cSYSTEMROOT\u003eWINDOWS\u003c/SYSTEMROOT\u003e\n        \u003c/WINDOWS\u003e\n        \u003cNAME\u003eWindows Server 2019 SERVERSTANDARDCORE\u003c/NAME\u003e\n        \u003cDESCRIPTION\u003eWindows Server 2019 SERVERSTANDARDCORE\u003c/DESCRIPTION\u003e\n        \u003cFLAGS\u003eServerStandardEvalCore\u003c/FLAGS\u003e\n        \u003cDISPLAYNAME\u003eWindows Server 2019 Standard Evaluation\u003c/DISPLAYNAME\u003e\n        \u003cDISPLAYDESCRIPTION\u003e(Recommended) This option omits most of the Windows graphical environment. Manage with a command prompt and PowerShell, or remotely with Windows Admin Center or other tools.\u003c/DISPLAYDESCRIPTION\u003e\n    \u003c/IMAGE\u003e\n    ...\n\u003c/WIM\u003e\n```\n\n## Contributing\n\nPull requests are welcome. Feel free to open an issue if you want to add other features.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp0dalirius%2Fpysortwindowsisos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp0dalirius%2Fpysortwindowsisos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp0dalirius%2Fpysortwindowsisos/lists"}