Jump to content
LaunchBox Community Forums

Help Creating a batch file to convert multiple folder format Xiso's to xiso.iso's


darreldearth
 Share

Recommended Posts

I've searched everywhere online and seems a lot of people are asking the same question, so would be awesome if anyone can help. I'm trying to convert Xbox folder format games to Xiso's using the extract-xiso tool. Basically the command is...

./extract-xiso -c ./(game folder name)

Then an xiso will be created in the same directory for the specified game folder which was is in that same directory.

I just need to know how to make a batch file which will run the same command over and over for every game folder that's within the same directory the batch file is in, without having to type the name of each folder manually and run the program a thousand times. 

Hope that makes sense if not I'll be more than happy to clarify further. Thanks! 

 

Also, here's a link to the program I'm needing a batch file for if it helps...

https://github.com/XboxDev/extract-xiso

Edited by darreldearth
Link to comment
Share on other sites

  • darreldearth changed the title to Help Creating a batch file to convert multiple folder format Xiso's to xiso.iso's
10 hours ago, darreldearth said:

a batch file which will run the same command over and over for every game folder that's within the same directory the batch file is in

 

FOR /D %%d in (*) DO extract-xiso -c %%d

OR

FOR /D %%d in (*) DO "D:\utils\ConvertToXISO\extract-xiso.exe" -c %%d

Use the 2nd option if your extract-xiso executable is not in the same folder as the batch file.  Change the path accordingly but keep that part in quotes.

  • Like 1
Link to comment
Share on other sites

6 hours ago, JoeViking245 said:

 

FOR /D %%d in (*) DO extract-xiso -c %%d

OR

FOR /D %%d in (*) DO "D:\utils\ConvertToXISO\extract-xiso.exe" -c %%d

Use the 2nd option if your extract-xiso executable is not in the same folder as the batch file.  Change the path accordingly but keep that part in quotes.

Awesome thanks! I'll try it when I get home and let you know if it worked. 😁

  • Like 1
Link to comment
Share on other sites

@JoeViking245

It worked perfectly! thanks! This simple code can speed things up so much for everyone who's downloaded all the xbox xiso folder formatted games from internet archive. lol At first I thought it wasn't working, but then realized each game needs to be a single word with no spaces, and I think 8 characters or less as well. so after I fixed the folder names it worked smoothly. thanks again!

Link to comment
Share on other sites

just curious but how would I use the same command on iso's if I wanted to convert the XISO's back to XISO folder format? tried this but it wont work....

FOR %%d in (*.iso) DO extract-xiso -x %%d

I used the -x because in the notes for extract-xiso.exe it said -x is to extract and -c is to create, but I've tried with and without -x and it wont work, so figured maybe i was using the wrong code in general to scan through and run commands on .iso files. 

 

Edited by darreldearth
  • Like 1
Link to comment
Share on other sites

8 hours ago, darreldearth said:

each game needs to be a single word with no spaces

OR.... put quotes around the last %%d (I think ;))

FOR /D %%d in (*) DO extract-xiso -c "%%d"

 

7 hours ago, darreldearth said:

convert the XISO's back to XISO folder

Try it from the Windows Command Prompt (not to be confused with the PowerShell Window) on just one file to test.  You can't do it in bulk until you figure out how to do just one.

extract-xiso "joes_game.iso"

If it errors, it should tell you why. Do you still have the preexisting subfolder called "joes_game"?

  • Like 1
Link to comment
Share on other sites

On 1/14/2022 at 2:16 PM, JoeViking245 said:

OR.... put quotes around the last %%d (I think ;))

FOR /D %%d in (*) DO extract-xiso -c "%%d"

 

Try it from the Windows Command Prompt (not to be confused with the PowerShell Window) on just one file to test.  You can't do it in bulk until you figure out how to do just one.

extract-xiso "joes_game.iso"

If it errors, it should tell you why. Do you still have the preexisting subfolder called "joes_game"?

Hello your command line to create xiso from extracted folder is fantastic it works wonderfully
would you have a command line to be able to extract my iso in xbe folder, when I drag and drop my iso games on extract-iso it extracts them but each time in a successive subfolder and after 5 to 6 games it crashes and stop

thank you

Link to comment
Share on other sites

1 hour ago, TOnino83 said:

it extracts them but each time in a successive subfolder

If you look at the documentation for the program, it says you can give it a specific folder to extract it to using "-d".  It also says without that additional parameter it defaults to extracting it a subfolder of the same name as the file you're extracting (which is what you're seeing).  So to tell it exactly where you want to extract the iso to, it looks like you'd do something like:

extract-xiso "joes_game.iso" -d "D:\myGames\this folder\"

Make sure you put the quotes as shown and have that last trailing slash at the end of your destination folder.

 

As for crashing, you'd need to talk to the developers of that program.

  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, JoeViking245 said:

Si vous regardez la documentation du programme, il est indiqué que vous pouvez lui donner un dossier spécifique pour l'extraire en utilisant "-d". Il indique également que sans ce paramètre supplémentaire, il extrait par défaut un sous-dossier du même nom que le fichier que vous extrayez (c'est ce que vous voyez). Donc, pour lui dire exactement où vous voulez extraire l'iso, il semble que vous feriez quelque chose comme :

Assurez-vous de mettre les guillemets comme indiqué et d'avoir cette dernière barre oblique à la fin de votre dossier de destination.

 

En ce qui concerne le plantage, vous devrez parler aux développeurs de ce programme.

it's nice to have answered but the thing is that I don't understand English well and I can't find " or it says that you can give it a specific folder to extract it using "-d " "
where should I insert this command line I made a bat file but it doesn't work.
I'm sorry for being so bad...
I would have liked to reverse the command line you provided and create batch xbe game folders

Link to comment
Share on other sites

16 minutes ago, JoeViking245 said:

It talked about it (the "-d" parameter) in the link that's on the 1st post.

Can you show us what the contents of your batch file looks like?

FOR /D %%d in (*) DO extract-xiso -c "%%d" extract-xiso ".iso" -d "M:\1\"  😅

thank you for taking the time to answer me sincerely 😘

I didn't name games because I want to play more than one at a time.

in the other direction your command line works perfectly.
I'm actually trying to extract xbox game images into folders and then I convert them back to iso using your command line.
but as it is I have to drag and drop my original isos one by one to extract them

 

and I went to see the link but I honestly didn't understand much...

 

Edited by TOnino83
Link to comment
Share on other sites

4 minutes ago, TOnino83 said:

FOR /D %%d in (*) DO extract-xiso -c "%%d" extract-xiso ".iso" -d "M:\1\"

Try it with just one command.  So you may need to have 2 batch files.  I suppose you could put them both into one, but separate out the commands.

Note that for the 2nd part you're dealing with Files and not Directories. So you need to change the "/D" to "/F".  And you also want to tell it to look for just the .iso files (*.iso).

FOR /D %%d in (*) DO extract-xiso -c "%%d"

FOR /F %%f in (*.iso) DO extract-xiso "%%f" -d "M:\1\"

Keep in mind, the second command is going to put everything into "M:\1\".

  • Thanks 1
Link to comment
Share on other sites

22 minutes ago, JoeViking245 said:

Essayez-le avec une seule commande. Vous devrez donc peut-être disposer de 2 fichiers batch. Je suppose que vous pourriez les mettre tous les deux en un seul, mais séparez les commandes.

Notez que pour la 2ème partie vous avez affaire à des Fichiers et non à des Répertoires . Vous devez donc remplacer le "/D" par "/F". Et vous voulez aussi lui dire de rechercher uniquement les fichiers .iso (*.iso).


Gardez à l'esprit que la deuxième commande va tout mettre dans "M:\1\".

it's really nice of you to answer so clearly and with more explanations, you're great

unfortunately it doesn't work, it just creates an iso folder for me that includes all the isos

Link to comment
Share on other sites

10 minutes ago, TOnino83 said:

it's really nice of you to answer so clearly and with more explanations, you're great

unfortunately it doesn't work, it just creates an iso folder for me that includes all the isos

sorry to have bored you in fact I found my happiness on the net

 

extract-xiso.exe

So i was looking for a newer tool to convert iso to xiso. I couldn't find one other than the newest version of extract-xiso, so I created a batch file to automatically convert multiple files by drag and drop.

Here is the code, obviously you would need to change the E: and the cd Xbox to match the location of the files. Hope this helps someone. Also if someone knows of a better tool I would appreciate a comment.

u/ECHO OFF

:TOP

IF (%1) == () GOTO END

e:

cd Xbox

extract-xiso -r %1

SHIFT

GOTO TOP

:END

ECHO Done!

PAUSE

thanks again hope it helps other people

Edited by TOnino83
  • Game On 1
Link to comment
Share on other sites

On 1/14/2022 at 5:16 AM, JoeViking245 said:

OR.... put quotes around the last %%d (I think ;))

FOR /D %%d in (*) DO extract-xiso -c "%%d"

 

Try it from the Windows Command Prompt (not to be confused with the PowerShell Window) on just one file to test.  You can't do it in bulk until you figure out how to do just one.

extract-xiso "joes_game.iso"

If it errors, it should tell you why. Do you still have the preexisting subfolder called "joes_game"?

your command works to convert an xiso back into a folder without any errors...

extract-xiso "joes_game.iso"

So to convert multiple XISO's back into XISO.ISO format this is what worked for the bat file for anyone how needs to know

FOR %%f in (*.iso) DO extract-xiso "%%f"

  • Like 1
Link to comment
Share on other sites

So just as a recap....

Batch Code To convert Multiple XISO Folder Formatted games (games must be 1 word no spaces) to XISO.isos is:

FOR /D %%d in (*) DO extract-xiso -c %%d

and then Batch Code from Multiple ISO's or XISO.iso's back to XISO Folder Formatted Games is:

FOR %%f in (*.iso) DO extract-xiso "%%f"

I've included the 2 batch files as well for anyone to download who needs them. Just put the .bat files and the extract-xiso.exe in the same folder with your games.

Thanks for your help! @JoeViking245

Convert All XISO.ISO's to Folder XISO's Bat.batConvert All Folder XISO's to XISO.ISO's Bat.bat

Edited by darreldearth
  • Game On 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...