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
Code: Select all
source folder: D:/source/
target folder: E:/target/
backup frequency: Daily
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.aimy wrote:Is this implausible?
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";
I don't know, but i would try it like this, perhaps you can adopt this:aimy wrote:How do I extend the script [...] based on the file modified date?
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
---------------------------