Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu/linux batch command #84

Closed
diicasses opened this issue Aug 15, 2023 · 3 comments
Closed

Ubuntu/linux batch command #84

diicasses opened this issue Aug 15, 2023 · 3 comments
Labels

Comments

@diicasses
Copy link

Anyone know a batch script/command to extract a bunch of folders?

@sharkwouter
Copy link

You'll have to be much more specific. If you just want the content of folders to be shown, you can just use ls -R.

If you want something more complex, you'd do something like this:

find ./ -type f -name "*.extension" -exec command {} \;

You'd replace extension with whatever type of file to wish to extract and command with the command you want to apply to the file. I'd assume we're talking unzip, tar or gzip or something here. Take a good look at the man of these commands if so.

This issue should probably be closed, though, as it's not really relevant to this project from what I can tell.

@diicasses
Copy link
Author

diicasses commented Aug 15, 2023

Just go from .XBE HDD folder > to .ISO.

So process a bunch of games at once into .ISOS into their respective folders or an output in the main folder.

@JayFoxRox
Copy link
Member

JayFoxRox commented Aug 20, 2023

This has nothing to do with extract-xiso (or Ubuntu for that matter).

Also, let me preface this, by saying that extract-xiso is the wrong tool for the job / your job is a bad idea.

By extracting an XISO, you'll have lost the layout of the files on the disc.
That is important for performance characteristics and occasionally things like copy-protection.

Even for emulators this will likely become relevant in the future.

FATX (where xiso most often ended up) also allows different filenames from XISO, so you might have created problems in the process. Also see #81.
Many tools running on the Xbox, when dumping to directory, will also apply cracks/patches to games. When serving from a harddisk / flashdrive, performance is not relevant, but when going back to XISO (which is meant for discs), this can be problematic.

Hence, once an XISO is extracted, you should never repack it.
Most official games came as XISO - you should not repack them.

Generally, you should stick to redump style ISOs for official games.
You should only use tools like extract-xiso for creating XISOs for your own applications/modded games (and even there, extract-xiso is very poor because you can't specify things like the disc-layout / keep changes minimal).

Obviously some exceptions for what I said above exist, but it sounds like you have a bunch of commercial games and want to turn them into XISO again after having them extracted previously: That's a bad idea.


To answer your question:

for foldername in */; do; echo $foldername; done

Anything between do and done will be run for each folder in the current directory.


Take anything below with a grain of salt, because I don't have extract-xiso installed right now, so this is guesswork based on the README

I assume you'll want something like:

for foldername in */; do; echo extract-xiso -c "$foldername" "$(basename $foldername).iso"; done

(the echo is for debugging purposes and needs to be removed)

Also, for completeness, you'd use this for extracting all of the ISOs:

for filename in *.iso; do; echo extract-xiso "$filename" -d "$(basename $filename .iso)"; done

(the echo is for debugging purposes and needs to be removed; also, this might need extract-xiso -x [...], the README is a bit confusing / potentially bad)


Closed as invalid: has nothing to do with extract-xiso, but enough guidance was provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants