Notices

Tips and Tricks Share tips that can save others time and frustration here !

Reply
 
LinkBack Thread Tools
Old 10-28-06, 01:49 PM   #1 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
TUTORIAL: Periodically & automatically backing up an important file to a memcard

I’ve received the following question in the Smartphone & Pocket PC Magazine forums:

I have a HX4700 with a Garmin CF620 Compact Flash GPSr unit.
This unit uses the Garmin QUE software for navigational purposes.
The active track-log is saved in a single file in the installation directory (program files) and on two occasions I've lost the tracklog and almost got myself in an emergancy situation due to either a battery issue or the necessity to do a hard reset.

My question is if you perhaps know of a 3rd party software that I can use to either in real-time or given time intervals mirror / sync the file to the Ipaq file store or external memory .

I'll even be happy if its a program that I have to run to copy the file to another location, then I can at least assign it to a button, and press it every so often.


The answer to this question is a big YES, you can do this, without having to use a full system backup. What is more, you can do this with a free (!) and fully automatic tool – I’ve custom-written an nScriptm script which does exactly what you want.

I’ve already elaborated a lot on the possible usages of the excellent nScriptm; please see for example this and this article, along with the links. (Search for “nScriptm” with Ctrl-F if you don’t want to read the entire article. I, however, as usual, recommend reading these articles in their entirety if you want to know how Pocket PC screenshots can be taken and how calls can be (automatically) recorded.)

To solve the problem asked by my reader, as I've already stated, I’ve written an nScriptm script. It’s available here for download. After you edit it to point to the source and the target files (they are \Program Files\source.txt and \SD-MMCard\backup.txt by default; you can, in general, leave the latter filename intact and only change the storage card path), you MUST put it in the \Program Files\ns\ directory (you must create it at first) so that the executable link file, which is available here, can find it. You must do the same with the executable file (ns.exe) of nScriptm available here – that is, put it in \Program Files\ns\.

Note that, along with the source and, possibly, the target filenames, you can also modify the interval of the backup. It’s 120 seconds by default. If you want to set it to another value, just modify the parameter in sleep(120).

You can, of course, put the executable link file, PeriodicallyBackupAFile.lnk, to \Windows\Start Menu\Programs for easy access.

Now, just start the backup tool by executing the latter executable link file and minimize nScriptm. It’ll continue running in the background and backing up your file.

Other alternatives

Note that you can also do the same with the excellent SKScheMa, which is another product of the excellent S-K people also written (more precisely, ported) nScriptm and a lot of other, high-quality tools like SKTools. With it, you can for example backup your stuff every, say, hour. The advantage of the SKScheMa-based solution that it doesn’t need to be always run in the background. That way, you can lower the CPU / memory usage.

Also, if you know how you can manually add timed, recurring events with, say, SKTools, you can manually execute a simple filecopy (without periodicity – that is, modify script to the following:

function main() {CopyFile("\\Program Files\\source.txt","\\SD-MMCard\\backup.txt");}

and just configure your event queue to execute the link file it, say, every hour.)

For geeks

For programmers or anyone that would like to know how it works and how easy nScriptm is to use, the script is as follows:

function main()
{

while(1<2)
{CopyFile("\\Program Files\\source.txt","\\SD-MMCard\\backup.txt");
sleep(120);}

}


(Note that there is no “true” symbolic constant in nScriptm and, therefore, I couldn’t use while(true) and you must escape backslash characters as with all C-like languages / regexps; this is why there are "doubled" backslash characters.)
__________________
MS MVP- Mobile Devices.
Menneisyys is offline   Reply With Quote
Sponsor Ads
Reply

Tags
automatically, backing, file, important, memcard, periodically, tutorial

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TUTORIAL: Defragment (reformat) your built-in File Store from time to time! Menneisyys Tips and Tricks 7 02-15-06 09:23 AM
Maximum MemCard? rtr1900 X30 / X3 / X3i Accessories 3 02-01-06 08:59 PM
FS 3 week old Axim x30 312 + kingston 512 SD memcard massacres Classifieds 16 09-07-05 08:57 AM
X50V turns on periodically upon cradle Lior_73 X50 / X51 Forums 4 06-16-05 07:36 AM
File could not be copied error when backing up npoon Applications and Utilities 0 08-29-03 09:31 AM


All times are GMT -5. The time now is 05:28 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC