Good automatic save backup program

Discussion in 'NDS - Flashcarts and Accessories' started by Satangel, Oct 29, 2007.

Oct 29, 2007
  1. Satangel
    OP

    Member Satangel BEAST

    Joined:
    Nov 27, 2006
    Messages:
    10,255
    Location:
    Bruges, Belgium
    Country:
    Belgium
    Is there a program that automatic will backup all the .SAV's in a directory, when I ask it?
    Cuz its a pain in the ass to copy all the .SAV's manually from my microSD to my PC...
    And all my roms are in apart folders, so it should be able to scan inside the folders.

    Tnx in adv.

    Satangel
     


  2. enigmaindex

    Member enigmaindex the Scarecrow

    Joined:
    Oct 11, 2007
    Messages:
    663
    Location:
    Gold Coast, Australia
    Country:
    Australia
    Yes, i really need one aswell.
     
  3. Ducky

    Member Ducky QUACKJECTION!

    Joined:
    Oct 13, 2007
    Messages:
    1,086
    Location:
    Duckling Land!
    Country:
    Israel
    theres Save Sender or whatever it's called... I just never understand how to use it..
     
  4. Satangel
    OP

    Member Satangel BEAST

    Joined:
    Nov 27, 2006
    Messages:
    10,255
    Location:
    Bruges, Belgium
    Country:
    Belgium
    Link?
    Homepage?
     
  5. Scalpos

    Newcomer Scalpos Member

    Joined:
    Nov 27, 2006
    Messages:
    10
    Country:
    France
    A simple batch / command line script is enough using 7zip or Rar

    eg: "7z a YourR4Archive.7z *.sav" for R4 SAV files
    "7z a YourG6Archive.7z *.0 *.1 *.2" for G6 files
    Add the "-r" recurse subdirectories switch if needed
     
  6. test84

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    i use a batch file, but i have to run it manually every time i connect my G6, donno how to put it in auto mode:

    xcopy "f:\NDS\*.0" "d:\current g6\NDS\" /y
    xcopy "f:\GBA\*.0" "d:\current g6\GBA\" /y
    xcopy "f:\NDS\*.0" "d:\current g6\saves\NDS\" /y
    xcopy "f:\GBA\*.0" "d:\current g6\saves\GBA\" /y
    xcopy "f:\DSNOTES\*.BMP" "d:\current g6\DSNOTES\" /y
    xcopy "f:\DSNOTES\*.BMP" "D:\0\My digital Paintings\DSNOTES" /y

    xcopy "G:\NDS\*.0" "d:\current g6\NDS\" /y
    xcopy "G:\GBA\*.0" "d:\current g6\GBA\" /y
    xcopy "G:\NDS\*.0" "d:\current g6\saves\NDS\" /y
    xcopy "G:\GBA\*.0" "d:\current g6\saves\GBA\" /y
    xcopy "G:\DSNOTES\*.BMP" "d:\current g6\DSNOTES\" /y
    xcopy "G:\DSNOTES\*.BMP" "D:\0\My digital Paintings\DSNOTES" /y


    i would like to write a program to rename the old file and use numerics for later files, rather than replacing them, but its a little unnecessary, aint it?

    and i donno how to xcopy and overwrite with the default switch to NO, instead of YES.
     
  7. GTScelica93

    Newcomer GTScelica93 Member

    Joined:
    Oct 19, 2007
    Messages:
    11
    Country:
    United States
    I use the following batch file to copy my saves:

    I'm sure that it could be more clean, but I threw this together after a quick google search. It will create a folder by date (ex 10 31 2007) and place the saves in that folder.

    Edit: The following seems to work a bit better:

    :: variables
    set drive=c:\
    set backupcmd=xcopy /c /h /i /r /y
    set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%
    %backupcmd% "f:\*.sav" "%drive%\NDS\Saves\%folder%"
     
  8. Lexal

    Newcomer Lexal Advanced Member

    Joined:
    Apr 2, 2007
    Messages:
    90
    Country:
    Sweden
    You could place the batcfile in ur root of the memstick and create a file named autorun.inf
    In that file, write:
    [autorun]
    open=Ur_batch.file
    icon=icon 4 ur drive.ico

    (included a little extra [​IMG])
     
  9. enigmaindex

    Member enigmaindex the Scarecrow

    Joined:
    Oct 11, 2007
    Messages:
    663
    Location:
    Gold Coast, Australia
    Country:
    Australia
    Thanks for that i'll be sure to try that later on.

    EDIT: Okay i got everything working. Heres what my .bat file says:

    (NOTE: both files are in the root directory of my Micro SD)

    I added an extra line which is "action=Back Up Your DS Saves"
    and here is the result of it

    [​IMG]

    As you can see i implemented it into the Autoplay option. This is very handy as pretty much just click on the "Back Up Your Nintendo DS Saves" and it will run the .bat and copy the saves to where ever you specified it to go. It's alot easier for me and thought i would share it with you.
     
  10. test84

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    1)the point is that my G6 doesnt pop up the Autorun Box anymore! donno why. (there is Autoron.inf file in root, but doesnt show up, i have to right click and select Autorun to see the window)

    [EDIT]
    thnx, that ACTION line saved me!

    2)is there a defualt NO for xcopy? i want to backup my .NDS and .GBA files but i just want xcopy to copy files that are not on my hard already.
    like xcopy "G:\*.gba" "d:\current g6\gba" /n so it will just copy .gba files that are not on my hard and not to copy 500mg everytime i backup.
     
  11. MadBob

    Member MadBob Nostalgia ain't what it used to be!

    Joined:
    Nov 6, 2002
    Messages:
    1,529
    Country:
    United Kingdom
    try xcopy /m

    I seem to remember that from my MS-DOS days as how we did incremental backup's, it checks for the archive data bit and resets it after copying the file, once you use the game (and it resaves the file) xcopy /m will see the file needs copying next time.
     
  12. MadBob

    Member MadBob Nostalgia ain't what it used to be!

    Joined:
    Nov 6, 2002
    Messages:
    1,529
    Country:
    United Kingdom
    OK as the above batch file wouldn't work on UK date formats I have re written it and added an explanation of what it all does for people not used to MS-DOS (yes I am an old fart) I have used a quote to let me put the actual commands in bold.

    I have stopped autorun on my system so needed a different approach, my batch file is called backme.cmd and this is the contents of my Autorun.inf

    [autorun]
    open=
    shell\DSBackup=Backup DS Saves
    shell\DSBackup\command=backme.cmd

    this adds the option Backup DS Saves to the right click context menu.
     
  13. enigmaindex

    Member enigmaindex the Scarecrow

    Joined:
    Oct 11, 2007
    Messages:
    663
    Location:
    Gold Coast, Australia
    Country:
    Australia
    Thanks for that right click context menu command line. I was looking for something like that.
     
  14. myuusmeow

    Member myuusmeow GBAtemp Advanced Maniac

    Joined:
    Jun 24, 2007
    Messages:
    1,643
    Country:
    United States
    Can you add something to the inf file to make it open up drive N: when it is done?

    (BTW, awesome. Never knew I used up about 30mB on saves only. XD)
     
  15. enigmaindex

    Member enigmaindex the Scarecrow

    Joined:
    Oct 11, 2007
    Messages:
    663
    Location:
    Gold Coast, Australia
    Country:
    Australia
    By that you mean drive N as your Micro SD card? If so i don't think it is possible i maybe wrong tho.
     
  16. MadBob

    Member MadBob Nostalgia ain't what it used to be!

    Joined:
    Nov 6, 2002
    Messages:
    1,529
    Country:
    United Kingdom
     
  17. jakeruston

    Member jakeruston GBAtemp Regular

    Joined:
    Jul 27, 2007
    Messages:
    136
    Country:
    United Kingdom
    Your version worked. Thanks [​IMG]
     
  18. striderx

    Member striderx GBAtemp Regular

    Joined:
    Jun 16, 2007
    Messages:
    238
    Location:
    USA
    Country:
    United States
    To everyone that've been contributing to this thread, thanks... These are great little solutions for making savegame backups easier.

    I'd like to ask for a couple of additional enhancements. I'd add these myself, but my own DOS library was disbanded long ago and google searches for the right format for the parameters in the commands aren't delivering what I'm looking for.

    In the set folder line, I'd like to add the volume name of the backup source (microSD card) at the beginning of the parameter string before the date and the time (HH:MM:SS) following the date.

    The resulting folder name should look like this: [striderx 20080127 170723]

    I've got several microSD cards, each with a different volume name (for each of my kids and myself). Some savefiles of the same name are on every one one of those cards so I want this to avoid collisions of the backups and also easily identify whose is whose by using the volume name. By adding the timestamp it would then support multiple backups during the same day (yes, it happens!) and by using the /M switch with xcopy, then only files changed since the last backup get copied during the current one.

    Can one of you help please?

    TIA,

    striderx

    UPDATE: I've been successful in adding the time to the folder name by appending the following to the set folder command:

    _%time:~0,2%%time:~3,2%%time:~6,2%

    Using this command:

    set folder=%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%

    I get a folder named like this:

    20080127_223621

    Still haven't cracked the volume name issue though. If I add the "vol" parameters using a command that looks like this:

    set folder=%vol:~0,20%_%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%

    I get this in response: (K: is the drive letter of my microSD card)

    K:\>set folder=~1,2date:~10,4%date:~4,2%date:~7,2time:~0,2%time:~3,2%time:~6,2

    K:\>xcopy /c /h /i /r /y /m "K:\*.sav" "\\Px-eh\disk\ROMS\\DS Save Backup\~1,2date:~10,4%date:~4,2%date:~7,2time:~0,2%time:~3,2%time:~6,2\"
    Invalid drive specification

     
  19. ACQ

    Newcomer ACQ Advanced Member

    Joined:
    Jul 29, 2007
    Messages:
    61
    Location:
    Spokane, WA
    Country:
    United States
    I'm not sure you can achieve what you want without getting into how Windows assigns unique identifiers to each removable drive. Maybe I'm misunderstanding the trouble you're experiencing, but would using the subst command to create different virtual drives for each microSD do the trick?
     
  20. striderx

    Member striderx GBAtemp Regular

    Joined:
    Jun 16, 2007
    Messages:
    238
    Location:
    USA
    Country:
    United States
    Well, I was trying to follow the example provided by the original batch file:

    When you execute the "DATE", "TIME" and "VOL" commands in "DOS box" of Windows XP you the the following in return:

    Microsoft Windows XP [Version 5.1.2600]
    Â Copyright 1985-2001 Microsoft Corp.

    C:\>date
    The current date is: 01/27/2008
    Enter the new date: (mm-dd-yy)

    C:\>time
    The current time is: 22:36:21.19
    Enter the new time:

    C:\>vol
    Volume in drive F is STRIDERX
    Volume Serial Number is 0000-0000

    C:\>

    The original batch file pieced together the date in this manner:

    set folder=%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%

    %date:~10,4% --- this returns the portion of the DATE command output starting at character position 10 and 4 characters after that which corresponds to the year. In this case it would be 2008.

    This then gets concatenated with %date:~4,2% --- which returns the portion starting at character position 4 and 2 characters after that corresponding to the month, or 01.

    Finally %date:~7,2% produces the day of the month.

    Put those all together and you get this: 20080127

    Do the samer thing for the TIME command, place an underbar (_)in there and this is the result: 20080127_223621

    Well I want to use the VOL command the same way and use the output in naming the folder in the same way the DATE and TIME were used.

    I can't seem to find the right incantation of %, ~, and numbers to do this without throwing an error.

    What I'm going to try later is to see if I can't hardcode the volume ID in the batch file rather than having it generated on the fly each time I run it.

    Using the examples above I want that folder to be named STRIDERX_20080127_223621

    This would be fine if it works, but then the batch file is no longer portable without modification. C'est la vie...

    striderx
     

Share This Page