TegraScript/scripts/Dump_saves.te
2023-09-19 12:33:20 -03:00

55 lines
No EOL
777 B
Text

#REQUIRE SD
#REQUIRE KEYS
#REQUIRE VER 4.0.0
partNames = ["SYSTEM", "USER"]
menuOptions = ["Exit"].copy()
partNames.foreach("x"){
menuOptions.add("Sysmmc " + x)
}
if (emu()){
partNames.foreach("x"){
menuOptions.add("Emummc " + x)
}
}
res = menu(menuOptions, 0)
if (!res){
exit()
}
clear()
if (res % 2) {
mountStr = "SYSTEM"
}.else() {
mountStr = "USER"
}
if (res > 2) {
mount = mountemu
}.else() {
mount = mountsys
}
if (mount(mountStr)){
println("Mounting failed!")
pause()
exit()
}
cpSaveFolder = menuOptions[res]
cpSavePath = combinepath("sd:/tegraexplorer/", cpSaveFolder)
mkdir("sd:/tegraexplorer")
mkdir(cpSavePath)
res = copydir("bis:/save", cpSavePath)
if (res) {
println("Copy failed! Errcode: ", res)
}.else() {
println("Done!")
}
pause()