Hacking Wii Batch file do delete and rename file or folder?

Jabe

Well-Known Member
OP
Member
Joined
Aug 28, 2009
Messages
173
Trophies
0
XP
182
Country
France
Hi!

I would like to know if there is any way to launch some .bat file or something similar with Homebrew Browser (or WiiXplorer maybe) in order to automatically:
-rename some folder
-delete some folders
-delete some files
-display some "Job done" message

It will be usefull to delete files faster on Wii, for example I created some .bat file for PC:
@echo off
rename bootmii bootmii_off
rmdir /s /q corpv3.6M
del /s /q wad
del IOS38-64-v3610.wad
del IOS38-64-v3867.wad
cd private
cd wii
del loc.bak
del loc.dat
cd title
rmdir /s /q aktn
cd..
cd..
cd..
cd apps
rmdir /s /q pimp_my_wii
rmdir /s /q TruchaBugRestorer
rmdir /s /q AnyTitleDeleter
rmdir /s /q cIOS38_rev17-Installer
rmdir /s /q priiloader-0.3b
rmdir /s /q cIOSCORP_v3.6_Main_Installer
rmdir /s /q cios_222_installer
rmdir /s /q cIOSInstaller_mplayerce
echo Job done Jabe!
pause
How to write the same command lines and run them directly from Wii?
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
the more common way ive seen it written is something like this
Code:
fatinitdefault();
remove("sd:/apps/blabla");
remove("sd:/apps/blabla1");
remove("sd:/apps/blabla2");

but i guess you could do something like
Code:
char path[100];
char oldpath[100];
char tmppath[100];

#define cd(x) sprintf(oldpath,"%s",path);sprintf(path,"%s/",oldpath,x);
#define del(x) sprintf(tmppath,"sd:/%s%s",path,x);remove(tmppath);
#define rmdir del
#define echo(x) printf("x");

fatinitdefault();
sprintf(path,"sd:/");

//so now most of your script might work
rename bootmii bootmii_off
rmdir (corpv3.6M)
del ( wad)
del (IOS38-64-v3610.wad)
del (IOS38-64-v3867.wad)
cd (private)
cd (wii)
del (loc.bak)
del (loc.dat)
cd (title)
rmdir (aktn)
cd(..)
cd(..)
cd(..)
cd (apps)
rmdir (pimp_my_wii)
rmdir (TruchaBugRestorer)
rmdir (AnyTitleDeleter)
rmdir ( cIOS38_rev17-Installer)
rmdir (priiloader-0.3b)
rmdir (cIOSCORP_v3.6_Main_Installer)
rmdir (cios_222_installer)
rmdir (cIOSInstaller_mplayerce)
echo (Job done Jabe!)

its just somehting i whipped up, so it might need some tweaking. obviously, cd isn't handled correctly, as it will max out just by doing cd(apps) cd (..). im sure you can figure out a better way to do it.
 

Jabe

Well-Known Member
OP
Member
Joined
Aug 28, 2009
Messages
173
Trophies
0
XP
182
Country
France
Up!

That's a good start, sorry for late answer I didn't see your answer before as I didn't get the mail notification
unsure.gif
.

Once I write the proper code, how do I compile it to launch it with homebrew browser?
 
M

myspacee

Guest
Find 'batch' idea very interesting.

This can resolve in SNEEK 47 item on screen problem.

on SD we can have more than 1 NAND dump. From HBC we can add several 'batch' that:
- rename actual folder to temp folder
- rename 'NAND2' folder to actualfolder
- run SNEEK

In general script can resolve different things, but this is first thing i think.

what you think about ?

m.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @realtimesave, iirc she said she is non binary