Author Topic: quickly backing up projects  (Read 4433 times)

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
quickly backing up projects
« on: 2007-12-04, 08:14:29 AM »
for those who need to back up projects heres an easy way to do that. this uses a built-in language called batch programming

open up notepad (or any text only editor) and type this in

Code: [Select]
copy *.* ".\Backup"
this means that you copy all files in this folder to a back up folder. you need to make a foler named "Backup" for this to work properly
Looking to the skies.....

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: quickly backing up projects
« Reply #1 on: 2007-12-04, 09:59:14 AM »
or you could use this:
Code: [Select]
if NOT exist ".\backup" mkdir .\backup
copy *.* .\backup
and that would do it all for you.  Or, if you wanted to make backups in different folders:
Code: [Select]
set tmpDir=%DATE:/=-%\%TIME::=.%
mkdir ".\%tmpDir%"
copy *.* ".\%tmpDir%"

Which will create a folder in the current directory with the name as the current date, and a folder with the current time under that, and copy everything in there.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2752
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: quickly backing up projects
« Reply #2 on: 2007-12-04, 06:45:31 PM »
Why do something so complicated when you can simply right-click on the folder containing the project, copy and paste to get a backup?  (Windows will name the copy "Copy of Project" where Project is the name of the original folder; then you can easily rename it if you want to.)

Also, for people who aren't careful to put all their project files in the same folder, be aware that this will not backup files outside the project folder.  So I strongly recommend making certain that all your files are in the same folder (you can check this by viewing the GDP file in notepad top see what other files it refers to.  I believe version 1.x also has a utility included in the start menu that helps you determine the files related to a project).

(SGDK2 doesn't have this issue, BTW, because all content is stored in a single SGDK2 file.)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: quickly backing up projects
« Reply #3 on: 2007-12-04, 09:46:59 PM »
Well, I know the reason I do something so complicated.  Because I like batch operations waaaay too much.
Edward Dassmesser

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Re: quickly backing up projects
« Reply #4 on: 2007-12-05, 08:05:24 AM »
i prefer this method because most of the time when i work on the project i constantly exit SGDK and work of the tilesets using other programs (like Paint). i like to keep the project folder open when i do this, so whenever i do that i could just quickly click on the Backup file and it does everythign for me.

plus, the game im working on would contain (hopefully) at least 15 levels, so the project would start getting bigger (as in you cannot see the whole folder in one window, even in 1024x768 or higher mode) and the backup file is right at the front of the pack.

also (at least for those whose dos programs dont exit rigth away when it ends) right click on the Backup.bat file and choose properties, choose the second tab (i think) and check "Close on Exit" so it will automatically close when its done with it.
Looking to the skies.....