├── DirectoryToXISO.bat ├── DirectoryToXISO.ps1 ├── LICENSE ├── README.md ├── RedumpToDirectory.bat ├── RedumpToDirectory.ps1 ├── RedumpToXISO.bat ├── RedumpToXISO.ps1 ├── extract-xiso.exe ├── fSplit.exe └── fSplit.exe.config /DirectoryToXISO.bat: -------------------------------------------------------------------------------- 1 | powershell -ExecutionPolicy ByPass -File .\DirectoryToXISO.ps1 2 | pause -------------------------------------------------------------------------------- /DirectoryToXISO.ps1: -------------------------------------------------------------------------------- 1 | [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null 2 | 3 | $DeleteSource = "a" 4 | $SplitXISO = "a" 5 | $TruncateNames = "a" 6 | 7 | $Yes = @("Yes", "YES", "yes", "Y", "y") 8 | $No = @("No", "NO", "no", "N", "n") 9 | 10 | while(-not($Yes.contains($SplitXISO) -or $No.contains($SplitXISO))) { 11 | $SplitXISO = Read-Host -Prompt "Split XISO? [Y]es or [N]o" 12 | } 13 | while(-not($Yes.contains($TruncateNames) -or $No.contains($TruncateNames))) { 14 | $TruncateNames = Read-Host -Prompt "Truncate Names? [Y]es or [N]o" 15 | } 16 | while(-not($Yes.contains($DeleteSource) -or $No.contains($DeleteSource))) { 17 | $DeleteSource = Read-Host -Prompt "Delete Source? [Y]es or [N]o" 18 | } 19 | 20 | $GetSource = New-Object System.Windows.Forms.FolderBrowserDialog 21 | $GetSource.Description = "Select Redump Source Directory" 22 | $GetSource.rootfolder = "MyComputer" 23 | if($GetSource.ShowDialog() -eq "OK"){ 24 | $SourceDir = $GetSource.SelectedPath 25 | } 26 | 27 | $GetDest = New-Object System.Windows.Forms.FolderBrowserDialog 28 | $GetDest.Description = "Select XISO Destination" 29 | $GetDest.rootfolder = "MyComputer" 30 | if($GetDest.ShowDialog() -eq "OK"){ 31 | $DestDir = $GetDest.SelectedPath 32 | } 33 | 34 | $Games = Get-ChildItem -Path $SourceDir -Directory 35 | 36 | foreach($Game in $Games) { 37 | 38 | echo("Converting $Game...") 39 | 40 | #Truncate name if selected 41 | $GameName = $Game.Name 42 | if($Yes.contains($TruncateNames) -and $GameName.length -gt 38){ 43 | $GameName = $GameName.Substring(0,38) 44 | } 45 | 46 | #Create packed XISO and delete source 47 | if($Yes.contains($DeleteSource)) { 48 | ./extract-xiso.exe -q -c $SourceDir\$Game $DestDir\$GameName.iso 49 | Remove-Item -R $SourceDir\$Game 50 | } 51 | 52 | #Create packed XISO and keep source 53 | else{ 54 | ./extract-xiso.exe -q -c $SourceDir\$Game $DestDir\$GameName.iso 55 | } 56 | 57 | $GameXISO = Get-Item $DestDir\$GameName.iso 58 | 59 | #Split XISO if larger than 4GB and truncate name if selected 60 | if($GameXISO.length/1MB -gt 4094 -and $Yes.contains($SplitXISO)){ 61 | if($Yes.contains($TruncateNames) -and $GameXISO.BaseName.length -gt 36){ 62 | $ShortName = $GameXISO.BaseName.Substring(0,36) 63 | Rename-Item $GameXISO "$ShortName.iso" 64 | $GameXISO = Get-Item("$DestDir\$ShortName.iso") 65 | } 66 | $GameName = $GameXISO.BaseName 67 | ./fSplit.exe -split 4094 mb $GameXiso -f "$DestDir\$GameName.{0}.iso" 68 | Remove-Item $GameXiso 69 | } 70 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OGXbox_extract-xiso_Batch_Scripts 2 | 3 | ***NOTE: this was a fun little exploration of directory traversal and scripting for me, but if you are seriously looking to organize your xbox library you should be using Team Resurgent's Repackinator: https://github.com/Team-Resurgent/Repackinator*** 4 | 5 | ----------------------------------------------------------------- 6 | 7 | Collection of PowerShell scripts to use extract-iso on batches of games 8 | 9 | All magic and credit to extract-iso (https://github.com/XboxDev/extract-xiso) 10 | 11 | ----------------------------------------------------------------- 12 | 13 | RedumpToXISO: 14 | 15 | Convert OG Xbox Redump ISOs to repacked (shrank) XISO format 16 | 17 | This script batch converts Xbox Redumps (complete disc rips from archive.org) to playable xisos using extract-iso (https://github.com/XboxDev/extract-xiso). It also uses fsplit.exe (taken from the 'Create and Split' tool floating around OG Xbox scenes) in order to split the resulting XISO so that it can be stored on an Xbox. 18 | The script asks the users if they want to delete the source redumps, split large XISOs, truncate the XISOs to 42 characters so they can be used on an Xbox. 19 | The script asks the user to input a source directory of redump ISOs and a destination directory for the resultant XISOs. 20 | The final XISOs will need to be further processed by the script built into XBMC4Gamers in order to create an attach.xbe and make them playable. 21 | 22 | You can run the powershell script by double clicking RedumpToXISO.bat or running the following command: 23 | powershell -ExecutionPolicy ByPass -File .\RedumpToXISO.ps1 24 | 25 | ----------------------------------------------------------------- 26 | 27 | RedumpToDirectory 28 | 29 | Extract OG Xbox Redump ISOs to directory format. This will also extract XISOs to directory format. 30 | 31 | The script asks if you want to delete source redumps 32 | The script asks the user to input a source directory of redump ISOs and a destination directory for the game directories 33 | 34 | You can run the powershell script by double clicking RedumpToDirectory.bat or running the following command: 35 | powershell -ExecutionPolicy ByPass -File .\RedumpToDirectory.ps1 36 | 37 | ----------------------------------------------------------------- 38 | 39 | DirectoryToXISO 40 | 41 | Convert OG Xbox games from directory format to repacked (shrank) XISO format 42 | 43 | This script can use fsplit.exe (taken from the 'Create and Split' tool floating around OG Xbox scenes) in order to split the resulting XISO so that it can be stored on an Xbox. 44 | The script asks the users if they want to delete the source redumps, split large XISOs, or truncate the XISOs to 42 characters so they can be used on an Xbox. 45 | The script asks the user to input a source directory of games in directory format and a destination directory for the resultant XISOs. 46 | The final XISOs will need to be further processed in order to create an attach.xbe and make them playable. I highly recommend Repackinator for this (https://github.com/Team-Resurgent/Repackinator) but you can also use the script built into XBMC4Gamers. 47 | 48 | You can run the powershell script by double clicking DirectoryToXISO.bat or running the following command: 49 | powershell -ExecutionPolicy ByPass -File .\DirectoryToXISO.ps1 50 | 51 | ----------------------------------------------------------------- 52 | 53 | These scripts have minimal to no error handling and have only been tested on Windows 10. I can not vouch in any way for the provenance of fSplit.exe, fSplit.exe.config, or extract-iso.exe. This script comes with no guarantees or warranties. You can find me at: 54 | 55 | twitter: braxtron instagram: son_of_mr_snails 56 | -------------------------------------------------------------------------------- /RedumpToDirectory.bat: -------------------------------------------------------------------------------- 1 | powershell -ExecutionPolicy ByPass -File .\RedumpToDirectory.ps1 2 | pause -------------------------------------------------------------------------------- /RedumpToDirectory.ps1: -------------------------------------------------------------------------------- 1 | [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null 2 | 3 | $DeleteSource = "a" 4 | 5 | $Yes = @("Yes", "YES", "yes", "Y", "y") 6 | $No = @("No", "NO", "no", "N", "n") 7 | 8 | while(-not($Yes.contains($DeleteSource) -or $No.contains($DeleteSource))) { 9 | $DeleteSource = Read-Host -Prompt "Delete Source? [Y]es or [N]o" 10 | } 11 | 12 | $GetSource = New-Object System.Windows.Forms.FolderBrowserDialog 13 | $GetSource.Description = "Select Redump Source Directory" 14 | $GetSource.rootfolder = "MyComputer" 15 | if($GetSource.ShowDialog() -eq "OK"){ 16 | $SourceDir = $GetSource.SelectedPath 17 | } 18 | 19 | $GetDest = New-Object System.Windows.Forms.FolderBrowserDialog 20 | $GetDest.Description = "Select Game Directories Destination" 21 | $GetDest.rootfolder = "MyComputer" 22 | if($GetDest.ShowDialog() -eq "OK"){ 23 | $DestDir = $GetDest.SelectedPath 24 | } 25 | 26 | $Games = Get-ChildItem -Path $SourceDir -Filter *.iso 27 | 28 | foreach($Game in $Games) { 29 | 30 | echo("Extracting $Game...") 31 | $GameName = $Game.BaseName 32 | ./extract-xiso.exe -q -d $DestDir\$GameName $SourceDir\$Game 33 | 34 | #Delete source 35 | if($Yes.contains($DeleteSource)) { 36 | Remove-Item $SourceDir\$Game 37 | } 38 | } -------------------------------------------------------------------------------- /RedumpToXISO.bat: -------------------------------------------------------------------------------- 1 | powershell -ExecutionPolicy ByPass -File .\RedumpToXISO.ps1 2 | pause -------------------------------------------------------------------------------- /RedumpToXISO.ps1: -------------------------------------------------------------------------------- 1 | [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null 2 | 3 | $DeleteSource = "a" 4 | $SplitXISO = "a" 5 | $TruncateNames = "a" 6 | 7 | $Yes = @("Yes", "YES", "yes", "Y", "y") 8 | $No = @("No", "NO", "no", "N", "n") 9 | 10 | while(-not($Yes.contains($SplitXISO) -or $No.contains($SplitXISO))) { 11 | $SplitXISO = Read-Host -Prompt "Split XISO? [Y]es or [N]o" 12 | } 13 | while(-not($Yes.contains($TruncateNames) -or $No.contains($TruncateNames))) { 14 | $TruncateNames = Read-Host -Prompt "Truncate Names? [Y]es or [N]o" 15 | } 16 | while(-not($Yes.contains($DeleteSource) -or $No.contains($DeleteSource))) { 17 | $DeleteSource = Read-Host -Prompt "Delete Source? [Y]es or [N]o" 18 | } 19 | 20 | $GetSource = New-Object System.Windows.Forms.FolderBrowserDialog 21 | $GetSource.Description = "Select Redump Source Directory" 22 | $GetSource.rootfolder = "MyComputer" 23 | if($GetSource.ShowDialog() -eq "OK"){ 24 | $SourceDir = $GetSource.SelectedPath 25 | } 26 | 27 | $GetDest = New-Object System.Windows.Forms.FolderBrowserDialog 28 | $GetDest.Description = "Select XISO Destination" 29 | $GetDest.rootfolder = "MyComputer" 30 | if($GetDest.ShowDialog() -eq "OK"){ 31 | $DestDir = $GetDest.SelectedPath 32 | } 33 | 34 | $Games = Get-ChildItem -Path $SourceDir -Filter *.iso 35 | 36 | foreach($Game in $Games) { 37 | 38 | echo("Converting $Game...") 39 | #Create packed XISO and delete source 40 | if($Yes.contains($DeleteSource)) { 41 | ./extract-xiso.exe -q -D -d $DestDir -r $SourceDir\$Game 42 | } 43 | 44 | #Create packed XISO and keep source with original name (extract-iso changes it to .old) 45 | else{ 46 | ./extract-xiso.exe -q -d $DestDir -r $SourceDir\$Game 47 | $Redump = Get-Item("$SourceDir\$Game.old") 48 | Rename-Item $Redump "$SourceDir\$Game" 49 | } 50 | 51 | #Truncate name if selected 52 | $GameXISO = Get-Item("$DestDir\$Game") 53 | if($Yes.contains($TruncateNames) -and $GameXISO.BaseName.length -gt 38){ 54 | $ShortName = $GameXISO.BaseName.Substring(0,38) 55 | Rename-Item $GameXISO "$ShortName.iso" 56 | $GameXISO = Get-Item("$DestDir\$ShortName.iso") 57 | } 58 | 59 | #Split XISO if larger than 4GB and truncate name if selected 60 | if($GameXISO.length/1MB -gt 4094 -and $Yes.contains($SplitXISO)){ 61 | if($Yes.contains($TruncateNames) -and $GameXISO.BaseName.length -gt 36){ 62 | $ShortName = $GameXISO.BaseName.Substring(0,36) 63 | Rename-Item $GameXISO "$ShortName.iso" 64 | $GameXISO = Get-Item("$DestDir\$ShortName.iso") 65 | } 66 | $GameName = $GameXISO.BaseName 67 | ./fSplit.exe -split 4094 mb $GameXiso -f "$DestDir\$GameName.{0}.iso" 68 | Remove-Item $GameXiso 69 | } 70 | } -------------------------------------------------------------------------------- /extract-xiso.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/braxtron/OGXbox_extract-xiso_Batch_Scripts/452056036413fcd253e027a22916a5a551700c1f/extract-xiso.exe -------------------------------------------------------------------------------- /fSplit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/braxtron/OGXbox_extract-xiso_Batch_Scripts/452056036413fcd253e027a22916a5a551700c1f/fSplit.exe -------------------------------------------------------------------------------- /fSplit.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 2 15 | 16 | 17 | 10 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | --------------------------------------------------------------------------------