New Super Batch Backup Script with Autorun Feature

Discussion in 'Other Flashing Hardware & Software' started by krad, Sep 13, 2006.

Sep 13, 2006
  1. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    Here is my attempt to update the good script already created before.....

    I have included a zip file from my website that has 3 file.

    file 1> autorun.inf
    points to a g6lite icon stored on the root of the g6lite
    labels the drive in windows as G6 Lite
    adds a shell command to windows to backup the g6lite, excluding certain file types.

    file2> g6lite.ico
    icon file of g6lite for pretty

    file3> G6LiteBackup.bat
    Creates a directory... default is c:\G6litebackup
    moves to that directory
    creates an exclude list in excluded.txt in that same folder
    files currently excluded are .nds .gba autorun.inf g6lite.ico and the g6litebackup.bat
    begins xcopy of whole g6lite excluding the file types and files above
    creates a file called timestamp.txt in the c:\G6litebackup folder with a stamp of date and time
    deletes the excluded.txt file on completion.

    The zip file is 123kb, it is large due to the icon i created that supports all pixel ranges from 6x6 to 256x256

    i will post the code now.... you may alter the "i:" to whatever your g6lite comes up as....
    you may change the folder or folder path... You could use swiches like "c:\documents and settings\%username&\Desktop"

    HOW TO INSTALL

    1. Alter the g6litebackup.bat to the way you like.
    2. Copy all three files to root of g6lite
    3. Right click and goto properties of each file and give them the hidden attribute.
    4. Hit refresh to see that they are now hidden.

    HOW TO RUN THIS????
    1. Insert g6lite with dongle into usb port.
    2. Right click on g6lite drive
    3. Hit BackMeUP

    that is it.

    WHY DID I DO THE SHELL ADDON, as opposed to autorun on connect?

    I think it would be very annoying everytime to not be able to double click on the drive to get into it. The way i set it up, it is clean, easy and doesn't hinder navigation in windows.... however it you want it to always autorun... follow directions on next line.

    If you want it to autorun, remove the shell\BackMeUp\ from "shell\BackMeUp\command=G6LiteBackup.bat" from autorun.inf

    The timestamp file will be in this format unless you want to change it.

    Backed UP
    10:57 AM
    Wed 09/13/2006
    ----------

    Every backup will add or increment onto this file like so...

    Backed UP
    10:57 AM
    Wed 09/13/2006
    ----------
    Backed UP
    10:59 AM
    Wed 09/13/2006
    ----------

    I take no responsibility for loss or damage... this works for me quite well.

    Here is the file... Download Here

    CODE:

    Autorun.inf
    ________________________________
    [autorun]
    shell\BackMeUp\command=G6LiteBackup.bat
    icon=g6lite.ico
    label=G6 Lite


    G6LiteBackup.bat
    _________________________________
    @ECHO OFF
    REM ------------------------G6LiteBackup.bat-----------------------
    REM Creates directory c:\G6LiteBackup
    REM changes directory to new folder
    REM create exclusion list of .nds and .gba and root files not needed you may add what you like here
    REM executes xcopy ;only newer files;copies all subdirectories;ignore errors;suppress y prompt;assume directory
    REM append date and time to Timestamp file
    REM deletes exclusion list
    REM ----------------------------by Krad----------------------------
    cd C:\
    md c:\G6LiteBackup
    cd c:\G6LiteBackup
    echo .nds>> c:\G6LiteBackup\excluded.txt
    echo .gba>> c:\G6LiteBackup\excluded.txt
    echo autorun.inf>> c:\G6LiteBackup\excluded.txt
    echo G6LiteBackup.bat>> c:\G6LiteBackup\excluded.txt
    echo g6lite.ico>> c:\G6LiteBackup\excluded.txt

    xcopy "I:\*" "c:\G6LiteBackup" /c /q /d /e /h /y /i /EXCLUDE:C:\G6LiteBackup\excluded.txt
    echo Backed UP>>c:\G6LiteBackup\Timestamp.txt
    TIME /T 1>>c:\G6LiteBackup\Timestamp.txt
    DATE /T 1>>c:\G6LiteBackup\Timestamp.txt
    echo ---------->>c:\G6LiteBackup\Timestamp.txt
    del /q c:\G6LiteBackup\excluded.txt

    ___________________________________________
    Let me know if you have any questions....

    I got some good windows hacks and things on my website where the file is located... www.kradest.com ... click on some links to help me out...

    Hope this is helpful...
     
  2. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    48 views.... no responses?
     
  3. bakhalishta

    Member bakhalishta my teef hurt

    Joined:
    Jun 30, 2004
    Messages:
    549
    Country:
    Canada
    I'm trying it right now [​IMG]

    Looks pretty good though. Great job man

    edit : How do I make it not backup the pdaDS folder ? Or is that important ?

    Btw, it's awesome. I'm gonna start using this instead of manually backing up everything [​IMG]
     
  4. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    just add another exclude line and put in the folder name. like

    echo .nds>> c:\G6LiteBackup\excluded.txt
    echo .gba>> c:\G6LiteBackup\excluded.txt
    echo autorun.inf>> c:\G6LiteBackup\excluded.txt
    echo G6LiteBackup.bat>> c:\G6LiteBackup\excluded.txt
    echo g6lite.ico>> c:\G6LiteBackup\excluded.txt
    echo pda>>c:\G6LiteBackup\excluded.txt

    or try

    echo I:\pda>>c:\G6LiteBackup\excluded.txt

    you might have to play with it... but it is ok to not add the line...

    YOu should leave the script alone because.

    the script only overwrites if the file is newer on the g6. Otherwise backing up the pda folder is a good think incase your pda folder gets corrupt.
     
  5. DarkElf101

    Newcomer DarkElf101 Member

    Joined:
    Aug 19, 2006
    Messages:
    42
    Country:
    United States
    Wow this is awesome you rule. I tried it with a few games and it does work.
    This what I changed mine to

    echo .nds>> c:\G6LiteBackup\excluded.txt
    echo .gba>> c:\G6LiteBackup\excluded.txt
    echo autorun.inf>> c:\G6LiteBackup\excluded.txt
    echo G6LiteBackup.bat>> c:\G6LiteBackup\excluded.txt
    echo g6lite.ico>> c:\G6LiteBackup\excluded.txt
    echo pda>>c:\G6LiteBackup\excluded.txt
    echo BACKING>>c:\G6LiteBackup\excluded.txt
    echo EMU>>c:\G6LiteBackup\excluded.txt
    echo MediaplayExtend>>c:\G6LiteBackup\excluded.txt
    echo .ico>>c:\G6LiteBackup\excluded.txt
    echo .bmp>>c:\G6LiteBackup\excluded.txt

    I only wanted GBA saves and DS saves to be backed up.
     
  6. sexymexi

    Newcomer sexymexi Member

    Joined:
    Aug 7, 2006
    Messages:
    23
    Country:
    not to be rude but, what does this do?
     
  7. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    The script and added files

    Create a new option on the right click method of the g6lite drive to back up all the save games and icons on the g6 incase of corruption.

    the script can be altered to your computer environment.

    I have basically set it to backup everything on the g6 except the games...

    when you run a backup, it will only overwrite if the file is newed on the g6.

    The inital backup should take a few minutes.. but after that it is a few seconds.
     
  8. Tieske

    Newcomer Tieske Newbie

    Joined:
    Jul 18, 2006
    Messages:
    3
    Country:
    Netherlands
    I just got to this thread by googling.
    I also made al little Windows program a while back to backup your Nintendo DS savegames.
    I created it with Kixtart en compiled it to an exe-file.
    I made it for my girlfriend in dutch, but I recompiled it in English.

    It also uses a right-click option on the USB-drive and then selecting "Backup all Nintendo DS savegames"
    (No autorun-feature, cause I couldn't get it to work on a removable drive)
    Then it asks to backup all NDS savegames to the folder specified in 'autorun.inf'
    When you press yes it will copy those files and give a report on which games were saved.
    It just copies al savegames (0,1,2) from a game to the specified dir. It doesn't check the date. (if the destination is newer).

    Just copy the G6-Backup.exe and autorun.inf to the root of your G6-Lite.
    Change the backupfolder directory in autorun.inf to your dir.
    Don't forget to add a '\' at the end.
    Then run G6-backup by double-clicking on it, or use the right-click on the driveletter method.


    autorun.inf
    --------------
    [autorun]
    icon=G6-Backup.exe
    Label=G6 Lite
    Shell\Backup=Backup all Nintendo DS savegames
    Shell\Backup\Command=G6-Backup.exe

    [G6backup]
    Backupfolder=c:\savebackup\

    --------------

    file:
    G6 Lite Backuptool


    grtz,
    Tieske

    oh yeah, I compiled the script with Kix2Exe:
    Kix2Exe Webpage
    Thanx to the author for this amazing program!
     
  9. Vidnez

    Newcomer Vidnez Advanced Member

    Joined:
    Jul 31, 2006
    Messages:
    54
    Country:
    I like it but I only backup the .0 files for both, NDS and GBA folders. [​IMG]

    How can I change it and recompile it?
     
  10. Guillo

    Newcomer Guillo Member

    Joined:
    Jul 29, 2006
    Messages:
    13
    Country:
    United States
    I can't seem to get this to work quite as you say... it will back things up if I manually run the .bat file in my G6 directory but no shell command exists which I would rather use...

    *edit: also does it make any difference if I used G:\ as opposed to g:\ when altering directories?

    *edit...again: nevermind about the shell command not working... I just needed to remove and reinsert the dongle+g6. Also is there a way to keep the command window open after the .bat is finished running for debugging purposes?

    *edit: ok I've figured out my problem... I want to put the files in G:\My Downloads\G6\Saves-Auto but the space in My Downloads is causing problems... I thought maybe the folder is really named My_Downloads and Windows was hiding the underscore but that wasn't it because the .bat then created a folder called My_Downloads... I'm picking and want it to go to that folder without having to rename it or anything.

    edit: Yay got it down. Quotes around the directory name did the trick. Sorry if this is obvious to everyone else but it wasn't to me.

    edit: This is an editting frenzy for me. I think if I get past this little problem everything will work just how I want it. The quotes thing seems to work for everything but this line:
    xcopy "H:\*" "G:\"My Downloads"\G6\Saves-Auto" /c /q /d /e /h /y /i /EXCLUDE:G:\"My Downloads"\G6\Saves-Auto\excluded.txt
    I think the quotes are throwing it off since everything runs fine but it won't copy the files. It runs just dandy if I replace all the "My Downloads" with MyDownloads but I want to force it to do what it want!
     
  11. Tieske

    Newcomer Tieske Newbie

    Joined:
    Jul 18, 2006
    Messages:
    3
    Country:
    Netherlands
    The reason this fails is probably the fact that you use the quotes in the quotes.....ehr..
    It could work if you try something like this:

    xcopy H:\* "G:\My Downloads\G6\Saves-Auto" /c /q /d /e /h /y /i /EXCLUDE:"G:\My Downloads\G6\Saves-Auto\excluded.txt"

    You don't need to use quotes if the parameter you specify doesn't contain any spaces.

    You could also check to see what the old MS-DOS 8.3 notation of your "My Downloads" directory is.
    Open a command prompt and type the following:
    g:\
    dir /x

    You should see a list with al foldernames on the right, with it's 8.3 notation to the left of them like this:
    ---------------------------------------------------------------------------------------------------------------------------
    C:\Documents and Settings>e:

    E:\>dir /x
    De volumenaam van station E is Test
    Het volumenummer is 1111-1111

    Map van E:\

    21-09-2006 23:52 161 autorun.inf
    21-09-2006 23:43 139.989 G6-BAC~1.EXE G6-Backup.exe
    21-09-2006 23:28 NDS
    18-09-2006 23:53 NINTEN~1 Nintendo DS
    2 bestand(en) 140.150 bytes
    4 map(pen) 51.384.770.560 bytes beschikbaar

    E:\>
    ----------------------------------------------------------------------------------------------------------------------------
    If I were to use the "Nintendo DS" folder as destination, I would use the NINTEN~1 instead.
    YOUR xcopy line would probably look like this:

    xcopy H:\* G:\MyDown~1\G6\Saves-Auto /c /q /d /e /h /y /i /EXCLUDE:G:\MyDown~1\G6\Saves-Auto\excluded.txt


    Hope this helps.
    If this doesn't work let me know.

    grtz,
    Tieske
     
  12. Guillo

    Newcomer Guillo Member

    Joined:
    Jul 29, 2006
    Messages:
    13
    Country:
    United States
    Yeah you nailed it. It works exactly how I want now. Had to use the old MS DOS notation. Thanks a ton Tieske.
     
  13. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    what about me?

    not only are you able to backup your saved games..... but you also learned about 5 things from ms-dos and file systems. That is more of an accomplishment imho.
     
  14. Guillo

    Newcomer Guillo Member

    Joined:
    Jul 29, 2006
    Messages:
    13
    Country:
    United States
    I've noticed a problem I'm having with this script and caught it before I made a horrible mistake. It doesn't seem to be overwriting the old saves. It just checks to see if there is a save there and then does nothing if there is. I have to delete all the old saves for it to copy the new ones over. I almost carelessly lost all my progress in Megaman ZX when rewriting it to my G6 but luckily I was suspicious and did a manual copy as well. Anyway to fix this?

    The script I'm using...

    @ECHO OFF
    REM ------------------------G6LiteBackup.bat-----------------------
    REM Creates directory G:\MyDown~1\G6\Saves-Auto
    REM changes directory to new folder
    REM create exclusion list of .nds and .gba and root files not needed you may add what you like here
    REM executes xcopy ;only newer files;copies all subdirectories;ignore errors;suppress y prompt;assume directory
    REM append date and time to Timestamp file
    REM deletes exclusion list
    REM ------------------------by Krad----------------------------
    cd G:\MyDown~1\G6
    md G:\MyDown~1\G6\Saves-Auto
    cd G:\MyDown~1\G6\Saves-Auto
    echo .nds>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo .gba>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo autorun.inf>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo G6LiteBackup.bat>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo g6lite.ico>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo BACKING>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo EMU>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo .ico>> G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo .bmp>> G:\MyDown~1\G6\Saves-Auto\excluded.txt

    xcopy "H:\*" "G:\MyDown~1\G6\Saves-Auto" /c /q /d /e /h /y /i /EXCLUDE:G:\MyDown~1\G6\Saves-Auto\excluded.txt
    echo Backed UP>>G:\MyDown~1\G6\Saves-Auto\Timestamp.txt
    TIME /T 1>>G:\MyDown~1\G6\Saves-Auto\Timestamp.txt
    DATE /T 1>>G:\MyDown~1\G6\Saves-Auto\Timestamp.txt
    echo ---------->>G:\MyDown~1\G6\Saves-Auto\Timestamp.txt
    del /q G:\MyDown~1\G6\Saves-Auto\excluded.txt
     
  15. krad
    OP

    Newcomer krad Advanced Member

    Joined:
    Jul 14, 2006
    Messages:
    51
    Country:
    United States
    sure.... you can add a line to delete the g6lite folder or just the save folders... remove the switch above for do not overwrite if already exists and viola. I will not give you the update because it is valuable to know this stuff and you will learn something looking this up and finding out what each switch does.
     
  16. Tir

    Member Tir GBAtemp Regular

    Joined:
    Jun 7, 2006
    Messages:
    151
    Country:
    Australia
    The link to the zip in the op is dead, can anyone reupload? Though I guess the only thing I can't get from the thread itself is the icon. This sounds awesome btw, thanks.
     
  17. kingeightsix

    Member kingeightsix GBAtemp Fan

    Joined:
    Aug 20, 2006
    Messages:
    307
    Location:
    Capital
    Country:
    Canada
    CRAZY! i already did my own icon autorun but the back up... astonishing!
     
  18. THeLL

    Member THeLL GBAtemp Fan

    Joined:
    Apr 28, 2004
    Messages:
    466
    Country:
    Netherlands
    Mirror:

    http://depositfiles.com/files/458215
     
  19. phreakymonkey

    Newcomer phreakymonkey Member

    Joined:
    May 31, 2006
    Messages:
    15
    Country:
    United States
    Sheesh, can someone mirror this again?
     
  20. n3rd

    Newcomer n3rd Member

    Joined:
    Mar 13, 2007
    Messages:
    33
    Country:
    Belgium
    Anyone remember how we can boot directly on games menu using this method

    I know it's possible but forgot how and lose the thread

    using my G6 lite as GBA cartridge in a GBA need command to boot on GBA games menu

    Big big thx to anyone can remember this
     

Share This Page