Hacking A fix to short filename Save files

jmchang

New Member
OP
Newbie
Joined
Dec 9, 2007
Messages
3
Trophies
1
XP
128
Country
United States
Now, if you are like me who don't use DOS as an operating system anymore, then you probably won't name your game in 8.3 format. (i.e. 0001 -~1.nds) Certainly, you won't like the idea that SCDSone creates save files in such form. Ever since the day I got this card, which is one week ago, I've been trying to fix this mess.

There are some observations that I found helpful in order to achieve the fix. The first one is that my old saves which are converted from my old m3 perfect works fine on SCDSone despite that they are properly named, so that means SCDSone is only incapable of making such files but have no problem reading them. The second observation is that if a properly named file with extension sav will be used by SCDSone despite what is the content of the file, even it's a zero-length file.

Now, this should be enough clue on how to fix this problem, all you have to do is create a properly named .sav file to every single game that you put in your memory card then you're all set. Of course if you want the real time save files to be named correctly, you'll have to create the .sci files as well.

It wouldn't be cool to do all those work manually. I mean after all it's a computer that we are using, so a program seems to be the right idea. But I don't want to write something too fancy for such a simple task, and I also want everyone to be able customize their setting to suit their using habit.

My answer is a batch file:
QUOTE said:
@echo off
SET ndssave=I:\nds\ndssave
FOR %%I IN (*.nds) DO IF NOT EXIST %%~nI.sav IF EXIST %ndssave%\%%~nI.sav (COPY %ndssave%\"%%~nI.sav") ELSE TYPE nul>%%~nI.sav
FOR %%J IN (*.nds) DO IF NOT EXIST %%~nJ.sci TYPE nul>%%~nJ.sci
FOR %%K IN (*.sav) DO IF %%~zK GTR 0 copy "%%K" %ndssave%\
FOR %%L IN (*.sav *.sci) DO IF NOT EXIST %%~nL.nds del "%%L"

Just copy the content in quote to a text editor (notepad will do just fine), you may need to make some small modifications such as change your nds save folder path, and then save to the folder you keep your nds games in your micro SD card as auto.bat, you may choose the name you like, but it must have the extension .bat. After that, all you have to do is execute this file every time after you add and/or delete games in your game folder, then you're good to go. Note: before you run this file, please make sure all your save files are properly named in both your save folder on hard drive and the game folder on your micro SD card.

Line-by-line explanation, this is for someone who want to know what's going on in this batch file and maybe want to modify it to fit their needs.
SET ndssave=I:\nds\ndssave
"I:\nds\ndssave" should be replaced with the path of the folder you keep your game saves on your hard drive.
FOR %%I IN (*.nds) DO IF NOT EXIST %%~nI.sav IF EXIST %ndssave%\%%~nI.sav (COPY %ndssave%\"%%~nI.sav") ELSE TYPE nul>%%~nI.sav
This line pretty much does everything I said about what this batch file would do. It first check if there are any .nds files without a properly named .sav file. If there is one, it will then check your save folder to see if you have played this game before. If you did, it will copy that save file to the SD card, if not, it will create a empty save file.
FOR %%J IN (*.nds) DO IF NOT EXIST %%~nJ.sci TYPE nul>%%~nJ.sci
Since I don't feel like to backup all my real time save files, this only creates an empty .sci file with proper naming if it didn't already exist.
FOR %%K IN (*.sav) DO IF %%~zK GTR 0 copy "%%K" %ndssave%\
This line copy all of the non-empty .sav file to your save folder.
FOR %%L IN (*.sav *.sci) DO IF NOT EXIST %%~nL.nds del "%%L"
Since the previous line backup all your void save files, this line will then delete the .sav and .sci files which don't have the corresponding .nds files (i.e. the save files left over after deleting the game).

There are plenty of cool things that you can do with this batch file, but remember to always try it on a temp. folder first as I won't be responsible for the lost of your data. Don't overwrite your valuable save data. Have fun!

Last Edit: I left out the quote around %%L in the last line, now fixed
 

sidneyyoung

Well-Known Member
Member
Joined
Nov 29, 2006
Messages
894
Trophies
0
XP
3
Country
Bangladesh
Well i guess all this is for save file backup purposes, where finding a backed up save could be akward.

Easiest solution is just bung the rom number on the beggining the file, since you will have to re-name them anyway for rom name recognition. ...example...

abcde_romdumpergroupname.nds
 

jmchang

New Member
OP
Newbie
Joined
Dec 9, 2007
Messages
3
Trophies
1
XP
128
Country
United States
No, you don't need to put rom number on the beginning the file for scds1 to recognize the file.

For example:
Great_Game.nds
-Great_~1.sav
Great_Garbage.nds
-Great_~2.sav

By the way, for your example, the save file's name is too long.
The correct 8.3 file name will be: 1234_G~1.sav

Besides, I don't think that it's reasonable to ask someone to upzip all their roms , change the names, and compress them again. Yes, I know programs like offlinelist does this for you, and I am actually recommending this program. But everyone should be able to name their games anyway they wanted, and the save should show the name properly as well.

However, if you don't think 1234_Great_game.sav makes more sense than 1234_G~1.sav, than you don't need this fix.
If you want to just create save files but don't want to backup, then you only need the first 3 lines (including @echo off) in your batch file.
If you want to ... It's very simple, figure it out.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up