Want to add Backup of Stack to my BGS Library
Moderator: Klaus
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Want to add Backup of Stack to my BGS Library
I'd like to add anothe funtion to backup my project.
After 12 months of continued confusion I think I've finally come up with a stardard way that works for me.
I've started with setting the Close the File option when Closing the last stack in file:
This way I know its removed from IDE memory. I've also arranged my projects here:
Last edited by BarrySumpter on Sat Mar 24, 2012 2:03 am, edited 1 time in total.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Want to add Backup of Stack to my BGS Library
I've also run a test to sort out what LiveCode IDE is doing on a save and save backup.
Pretty much the save just saves over the top of the last save.
So If I save a backup: The Next save just saves over the top of my last backup.
BUT the next Save as .... default file name DOES NOT change when saving as a different file name.
So when I Save as... the default file name stays as the orignal file. Making me think the IDE has been saving my work properly in that file name.
But it hasn't.
Its been saving my work over the top of the last saved as file name.
Which was my last backup file name.
To me, I feel like this is still an error. And very confusing.
i.e. the Save as... default file name AND path should be the last file name AND path I saved under.
So to combat this now after 12 months of confusion I:
1) save as... the new backup stack
2) save as... again as the original stack
---
So, I'd like to create a command to to Back Up
Which will:
1) retrieve the file name of my current stack
2) retreive the folder of my current stack
3) Create a BU folder if its not alreay there using the folder path from step 2
4) save my stack as the file name from step 1 under the BU folder from step 3 as the next backup in this format:
myStack_BU5.livecode or could even be myStack_BU 2012 03 04 1159.LiveCode
5) save my stack again as the original stack name on the original folder from step 1 and 2
6) set the next Save as ... folder to default to my current folder from step 2 - may be redundant
7) make sure the default file name on the next Save as ... is the original file name from step 1 - may be redundant
tia
Pretty much the save just saves over the top of the last save.
So If I save a backup: The Next save just saves over the top of my last backup.
BUT the next Save as .... default file name DOES NOT change when saving as a different file name.
So when I Save as... the default file name stays as the orignal file. Making me think the IDE has been saving my work properly in that file name.
But it hasn't.
Its been saving my work over the top of the last saved as file name.
Which was my last backup file name.
To me, I feel like this is still an error. And very confusing.
i.e. the Save as... default file name AND path should be the last file name AND path I saved under.
So to combat this now after 12 months of confusion I:
1) save as... the new backup stack
2) save as... again as the original stack
---
So, I'd like to create a command to to Back Up
Which will:
1) retrieve the file name of my current stack
2) retreive the folder of my current stack
3) Create a BU folder if its not alreay there using the folder path from step 2
4) save my stack as the file name from step 1 under the BU folder from step 3 as the next backup in this format:
myStack_BU5.livecode or could even be myStack_BU 2012 03 04 1159.LiveCode
5) save my stack again as the original stack name on the original folder from step 1 and 2
6) set the next Save as ... folder to default to my current folder from step 2 - may be redundant
7) make sure the default file name on the next Save as ... is the original file name from step 1 - may be redundant
tia
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Want to add Backup of Stack to my BGS Library
I'd just do it like this:
Edited to fix backup path.
Code: Select all
put <path to backup folder> into tBUPfolder -- assumes it ends with a slash
if there is no folder tBUPfolder then create folder tBUPfolder
put the filename of this stack into tSourceStack
put tBUPfolder & the short name of this stack && the seconds into tDestStack -- add seconds or whatever to keep filename unique
put url ("binfile:" & tSourceStack) into url ("binfile:" & tDestStack)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Want to add Backup of Stack to my BGS Library
Thanks jaque!
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.