Welcome, Guest. Please login or register.
Did you miss your activation email?


Recent news:

March 10, 2010 - Keybreeze is now a 100% free, open source application. The new version includes everything that was previously in the Professional Edition. Update now.


   Home   Help Search Login Register  
 

Pages: [1]
  Print  
Author Topic: Backup your files  (Read 2708 times)
Andrew Langford
Administrator
Power User

Posts: 144


View Profile
« on: December 29, 2006, 01:27:22 PM »

I have a macro called backup that automatically backs up my important files and folders.  You can do this by creating a macro and using the CMD plugin.  If you haven't downloaded the CMD plugin yet, visit www.keybreeze.com/plugins to do so.

Let's say your backup folder is D:\backup, and you want to backup your Keybreeze folder (C:\Program Files\Keybreeze).  So basically, you want to copy everything in C:\Program Files\Keybreeze to D:\Backup\Keybreeze

To start off, you first want to delete the old backup data.  Why?  Because your new backup might have fewer files than the old backup, and you don't want extra files lying around.  Those extra files can cause problems with programs -- In Keybreeze, those old files could be old notes, which would cause both old notes and new notes to pop up the next time you load Keybreeze -- not good.

So the first command in the macro editor should be:  <Keybreeze cmd,/c rmdir "d:\backup\keybreeze" /s /q>  This command will delete all the subdirectories and files within d:\backup\keybreeze.  MAKE SURE YOU SPECIFY THE RIGHT BACKUP FOLDER.  DO NOT TYPE c:\program files\keybreeze

Now you will want to set a delay for at least 5 seconds.  This will give the command prompt time to perform the task.  You could also use the <waitforuser> command instead of setting a delay.

Now you want to type the command that will actually copy the folder to the backup folder: <Keybreeze cmd,xcopy "c:\program files\keybreeze" "d:\backup\keybreeze" /c /i /y /s /r


The final macro should look something like this:

<Keybreeze cmd,/c rmdir "d:\backup\keybreeze" /s /q><delay 5000><Keybreeze cmd,xcopy "c:\program files\keybreeze" "d:\backup\keybreeze" /c /i /y /s /r>

This will delete the backup folder first, wait for 5 seconds, and then copy all of the files and subdirectories in C:\program files\keybreeze to D:\backup\keybreeze.

You can use this macro example to backup any files or folders on your computer.
« Last Edit: July 22, 2007, 12:08:31 PM by Andrew Langford » Logged
BigChuckMeister
Sr. Member

Posts: 7


View Profile
« Reply #1 on: December 16, 2007, 04:13:47 PM »

I have a newbee question for you:  Suppose I want to use this same command to copy one external hard drive to another (as back up) ... how long a pause should be inserted for, say, 200 GB to be deleted (old files), before the next phase starts.  Or, even better, can I visually watch the files to be deleted, and then tell the macro to go ahead and start copying the new back up files to the second drive?
Logged

Reminder:  Every day above the ground is a good day!  (Remember:  The grass is definitely "greener" on THIS SIDE!!!)
Andrew Langford
Administrator
Power User

Posts: 144


View Profile
« Reply #2 on: December 16, 2007, 10:24:47 PM »

Quote
Or, even better, can I visually watch the files to be deleted, and then tell the macro to go ahead and start copying the new back up files to the second drive?

Yes, use the <waitforuser> instruction.  This will pop up a message box, which will pause the macro.  When you want to resume the macro, just press OK.
Logged
BigChuckMeister
Sr. Member

Posts: 7


View Profile
« Reply #3 on: January 26, 2008, 12:17:52 AM »

Thanks for the feedback!!!  Sorry I didn't respond sooner.  I've been going crazy with this AWESOME program you've created.  I realize this is probably not the right forum for suggestions, however I will take the opportunity nonetheless:  I'm a huge music geek.  I have approx. 250GB of music in my iTunes (approx. 45k songs).  Once upon a time, I had to have two ipods to carry all of the music.  I had one that I would use at work (only family appropriate material), and one I would use everywhere else (to listen to with headphones - if you get my drift).  Anyway, in order to make synching easier, I took the effort of putting a combination letter/number code in the ID3 tag of each file to indicate which iPod it should go in to when I synch.  I don't need these letter codes any more, and I still have 18k files with them in it.  I want to delete them all, but I've determined that keybreeze will only let me copy & paste approximately 150 cycles, so I have to wait until it finishes the cycle and then start it over again.  I'd like for keybreeze to repeat itself until it gets some sort of error code (ideally, the "Next" button is "not found"), and then it quits on it's own.  Is something like that possible?  In WP 5.1 macros, there was a line of text that could be used that was something to the effect of:

[On Not Found][Go To](Variable)~~

The "Tilde" (or ~), was a way of indicating the end of a command.  In the previous example, the first "~" ended the [Go To](Variable)~ command (see another example below), and the second "~" ended the [On Not Found] command, which included the [Go To](Variable)~.

Also, instead of retyping (or copy & pasting nowadays), WP would also let you put in "Labels" for different sections of the macro text.  That way if something repeated, you could use a similar code to tell it to go back to the beginning, such as:

[Label]Beginning~
[On Not Found][Go To]End~~
[Tab][Tab][Tab][Tab][Tab][Tab][Tab][Tab][Enter][Bksp]
[Go To][Label]Beginning~~

[Label]End~
[Escape] or [Save]

Such commands and labeling could be available only in the purchased versions, thus only available to the more advanced users, and I would be more than happy to help in assisting questions on a regular basis if there were something like this in place.  It would make life so much simpler.  I hope I explained my self well enough.  Even more importantly, I hope this type of idea is possible.  I don't think it would hog up too much space (since I'm sure that's a major concern).

Finally, another simple suggestion.  I don't write programs, so I don't know if this is, in fact, how it could be done, but how about a command such as <Tab(12)> which would tell the program to <Tab> 12 times?  This would be much easier than adding twelve <Tab>'s and then having to recount them each time you do.
Logged

Reminder:  Every day above the ground is a good day!  (Remember:  The grass is definitely "greener" on THIS SIDE!!!)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!