From 429f254029d6e5cf2828848ead3183fa8b3a0e3e Mon Sep 17 00:00:00 2001 From: mbirth Date: Mon, 26 Mar 2007 15:49:21 +0000 Subject: [PATCH] ! raised version to 1.3 + compare size/timestamp of files before backing up (saves time!) ! need to implement the same for folders - may have to rewrite to file-loop --- U3H_hostCleanUp.ahk | 11 +++++++++++ U3Helper.ahk | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/U3H_hostCleanUp.ahk b/U3H_hostCleanUp.ahk index eac189d..4ee3e4c 100644 --- a/U3H_hostCleanUp.ahk +++ b/U3H_hostCleanUp.ahk @@ -83,6 +83,17 @@ Else { IfExist %U3_HOST_EXEC_PATH%\%CurFile% { + IfExist %U3_APP_DATA_PATH%\%CurFile% + { + FileGetSize FilSize1, %U3_HOST_EXEC_PATH%\%CurFile% + FileGetSize FilSize2, %U3_APP_DATA_PATH%\%CurFile% + FileGetTime FilStamp1, %U3_HOST_EXEC_PATH%\%CurFile% + FileGetTime FilStamp2, %U3_APP_DATA_PATH%\%CurFile% + if ((FilSize1 = FileSize2) and (FilStamp1 = FilStamp2)) { + ; Both versions are same size and same date/time - skip + Continue + } + } Status("Saving data file " . CurFile . " ...") FileCopy %U3_HOST_EXEC_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%CurFile%, 1 } diff --git a/U3Helper.ahk b/U3Helper.ahk index ff22105..2ab51a7 100644 --- a/U3Helper.ahk +++ b/U3Helper.ahk @@ -2,7 +2,7 @@ #NoEnv #Include mb_IniTools.ahk #Include mb_TextTools.ahk -U3HVer = 1.2 +U3HVer = 1.3 EnvGet U3_DEVICE_SERIAL, U3_DEVICE_SERIAL ; serial number of device (copy protection) EnvGet U3_DEVICE_PATH, U3_DEVICE_PATH ; drive letter to device (F:)