Page 1 of 1
Scheduled Backup
Posted: 12 Jun 2012 11:08
by aimy
Hi.
Sorry if it sounds too simple, but how do I make a script that will automatically perform the backup of files/folders?
Let's say..
Code: Select all
source folder: D:/source/
target folder: E:/target/
backup frequency: Daily
Thank you.
Re: Scheduled Backup
Posted: 14 Jun 2012 09:12
by aimy
Is this implausible?

Re: Scheduled Backup
Posted: 14 Jun 2012 09:28
by eil
currently not possible, 'cause schedule means automatic/by time start.
Re: Scheduled Backup
Posted: 14 Jun 2012 09:30
by j_c_hallgren
aimy wrote:Is this implausible?

Not a script writer myself but based on what I've read/seen, it needs a task scheduler to trigger it as compared to XY doing so...it seem that XY scripts are more for things that
you invoke rather than a time based event.
Re: Scheduled Backup
Posted: 14 Jun 2012 09:37
by aimy
thanks eil & jc..
ok, let's say I have a program to schedule the script..
so, will it be possible for me to run the XYplorer script using the command bat file?
If it is, how? What should the backup script looks like anyway?
Thanks.
Re: Scheduled Backup
Posted: 09 Jul 2012 07:39
by aimy
Seems the auto backup is not available.
So, can pls someone help me on this..
I have these script assigned under the user button:
Code: Select all
"Copy Settings"
copyitem "D:\Documents and Settings\S13018.TMMASTER\Application Data\Silicon Circus\PenguiNet\profiles.pnt","D:\SugarSync\Programs\Work\PenguiNet\profiles.pnt";
copyitem "D:\Documents and Settings\S13018.TMMASTER\Application Data\Hot Keyboard\hotkeyb_4_0.data","D:\SugarSync\Programs\Hot Keyboard Pro\hotkeyb_4_0.data";
How do I extend the script so that when I pressed the button it will automatically copy from source to target or vice versa based on the file modified date?
Please assist.
Thank you.
Re: Scheduled Backup
Posted: 13 Jul 2012 04:35
by aimy
Anyone?

Re: Scheduled Backup
Posted: 13 Jul 2012 06:30
by Filehero
Hi aimy,
why not taking this approach:
- create a User-Defined Command of category "Backup To"
- in Config/File Operations/Backup set the property "on name collisions" to overwrite if newer
What you need is already there (except automation).
Cheers,
Filehero
Re: Scheduled Backup
Posted: 13 Jul 2012 09:08
by Stefan
aimy wrote:How do I extend the script [...] based on the file modified date?
I don't know, but i would try it like this, perhaps you can adopt this:
Code: Select all
//get timestamp from an selected file:
$file1 = "<curitem>";
$time1 = report("{Modified}", $file1);
//$file2 =
//$time2 =
msg "$file1<crlf>$time1";
---------------------------
XYplorer
---------------------------
C:\TEMPO\Neues Textdokument.txt
28.03.2012 13:29:44
---------------------------
OK
---------------------------
//==============================
//compare timestamps:
//(Here with example timestamps. In real get the timestamps as shown above)
$t1 = "28.03.2012 13:29:44";
$t2 = "28.3.2012 13:29:40";
//format the timestamps to an compareable string:
$t1 = formatdate($t1, "yyyymmddhhnnss");
$t2 = formatdate($t2, "yyyymmddhhnnss");
//compare the two strings numeric:
$t2younger = compare($t1, $t2, "n");
msg "Result of comparing t1 to t2:<crlf 2>IF t1 > t2? results in: $t2younger";
---------------------------
XYplorer
---------------------------
Result of comparing t1 to t2:
IF t1 > t2? results in: 1
---------------------------
OK
---------------------------
//==============================
//do something with that result:
if($t2younger==1){$t2younger="No";}else{$t2younger="Yes";}
msg "1: $t1<crlf>2: $t2<crlf 2>If timestamp 2 younger?<crlf 2>$t2younger";
---------------------------
XYplorer
---------------------------
1: 20120328132944
2: 20120328132940
If timestamp 2 younger?
No
---------------------------
OK
---------------------------