dburtis2
21-Nov-2010, 04:20 AM
I'm using a script to save files newer than 3 days old into a separate location. Most of the script works, but a couple of files known to be newer than 3 days are not being copied. (Script completes normally and the log file does not show any files copied in part 2 of the script).
I've tried various sync operations in addition to the copy command; and tried different order for the filter command, expand command. Tried copy with a select command and sync without the select command. Using BC 3 3.1.11 (build 12204), OS is Win 7 (32 bit). What am I doing wrong?
Here is the script:
log verbose append:"C:\Users\don\Documents\____Beyond Compare Logs\BG_pre-archive_log.txt"
#
# 1. Delete all files in archive 14 (oldest archive). This eliminates possibility that files older than 3 days
# remain in the archive. Use the Passport folder on both sides of the load command to ensure no files get
# erased on the laptop.
#
load "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
select rt.all
option confirm:yes-to-all
delete recyclebin=no rt
#
# 2. copy new timestamp folder unconditionally (before newer than 3 days time filter is applied)
#
load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
filter "zzzReserved4Timestamp\"
select left.all.folders
option confirm:yes-to-all
copy lt->rt
filter none
#
# 3. Synchronize the new files with the oldest archive of new files (the "-14" version)
#
load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
expand all
filter cutoff:<3days
select lt.files
copy lt->rt
filter cutoff:none
collapse all
select rt.all.folders
rename regexpr "zzzReserved4Timestamp" "____Archived %date%_time-%fn_time%"
expand all
select empty.folders
delete recyclebin=no rt
Here is the log file (portion covered by the script):
11/21/2010 4:10:25 AM >> log verbose append:"C:\Users\don\Documents\____Beyond Compare Logs\BG_pre-archive_log.txt"
11/21/2010 4:10:25 AM >>
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> # 1. Delete all files in archive 14 (oldest archive). This eliminates possibility that files older than 3 days
11/21/2010 4:10:25 AM >> # remain in the archive. Use the Passport folder on both sides of the load command to ensure no files get
11/21/2010 4:10:25 AM >> # erased on the laptop.
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> load "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:25 AM Load comparison: I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14 <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:25 AM >> select rt.all
11/21/2010 4:10:25 AM >> option confirm:yes-to-all
11/21/2010 4:10:25 AM >> delete recyclebin=no rt
11/21/2010 4:10:25 AM Deleted I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\____Archived 2010-11-21_time-03-40-30\ZeroLengthFile.txt
11/21/2010 4:10:25 AM Deleted I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\____Archived 2010-11-21_time-03-40-30
11/21/2010 4:10:25 AM Successfully deleted 2 items. Completed in 0.05 seconds.
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> # 2. copy new timestamp folder unconditionally (before newer than 3 days time filter is applied)
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:26 AM Load comparison: C:\Users\don\Documents\Burtis Group Files <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:26 AM >> filter "zzzReserved4Timestamp\"
11/21/2010 4:10:26 AM >> select left.all.folders
11/21/2010 4:10:26 AM >> option confirm:yes-to-all
11/21/2010 4:10:26 AM >> copy lt->rt
11/21/2010 4:10:26 AM Copied C:\Users\don\Documents\Burtis Group Files\zzzReserved4Timestamp\ZeroLengthFile.txt to I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\zzzReserved4Timestamp
11/21/2010 4:10:26 AM Successfully copied 1 items. Completed in 0.03 seconds.
11/21/2010 4:10:26 AM >> filter none
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> # 3. Synchronize the new files with the oldest archive of new files (the "-14" version)
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:26 AM Load comparison: C:\Users\don\Documents\Burtis Group Files <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:26 AM >> expand all
11/21/2010 4:10:26 AM >> filter cutoff:<3days
11/21/2010 4:10:26 AM >> select lt.files
11/21/2010 4:10:26 AM >> copy lt->rt
11/21/2010 4:10:26 AM >> filter cutoff:none
11/21/2010 4:10:26 AM >>
11/21/2010 4:10:26 AM >> collapse all
11/21/2010 4:10:26 AM >> select rt.all.folders
11/21/2010 4:10:26 AM >> rename regexpr "zzzReserved4Timestamp" "____Archived 2010-11-21_time-04-10-26"
11/21/2010 4:10:26 AM Renamed I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\zzzReserved4Timestamp to ____Archived 2010-11-21_time-04-10-26
11/21/2010 4:10:26 AM Successfully renamed 1 items. Completed in 0.02 seconds.
11/21/2010 4:10:26 AM >>
11/21/2010 4:10:27 AM >> expand all
11/21/2010 4:10:27 AM >> select empty.folders
11/21/2010 4:10:27 AM >> delete recyclebin=no rt
Note that using the mirror sync command, I get copies of all of the folders from heh source, but all of them (except the "____Archived 2010-11-21_time-04-10-26" folder which was copied separately as "zzzReserved4Timestamp" then renamed) are empty - even folders that contain files newer than 3 days old (I even inserted a new file during this round of testing to ensure one file was way less than 3 days old. (The delete empty folders portion of the script was added later to remove the empties. It works fine, and I determined that all of the deleted folders were in fact empty before deletion.
Please help me understand what I'm doing wrong.
Don Burtis
I've tried various sync operations in addition to the copy command; and tried different order for the filter command, expand command. Tried copy with a select command and sync without the select command. Using BC 3 3.1.11 (build 12204), OS is Win 7 (32 bit). What am I doing wrong?
Here is the script:
log verbose append:"C:\Users\don\Documents\____Beyond Compare Logs\BG_pre-archive_log.txt"
#
# 1. Delete all files in archive 14 (oldest archive). This eliminates possibility that files older than 3 days
# remain in the archive. Use the Passport folder on both sides of the load command to ensure no files get
# erased on the laptop.
#
load "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
select rt.all
option confirm:yes-to-all
delete recyclebin=no rt
#
# 2. copy new timestamp folder unconditionally (before newer than 3 days time filter is applied)
#
load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
filter "zzzReserved4Timestamp\"
select left.all.folders
option confirm:yes-to-all
copy lt->rt
filter none
#
# 3. Synchronize the new files with the oldest archive of new files (the "-14" version)
#
load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
expand all
filter cutoff:<3days
select lt.files
copy lt->rt
filter cutoff:none
collapse all
select rt.all.folders
rename regexpr "zzzReserved4Timestamp" "____Archived %date%_time-%fn_time%"
expand all
select empty.folders
delete recyclebin=no rt
Here is the log file (portion covered by the script):
11/21/2010 4:10:25 AM >> log verbose append:"C:\Users\don\Documents\____Beyond Compare Logs\BG_pre-archive_log.txt"
11/21/2010 4:10:25 AM >>
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> # 1. Delete all files in archive 14 (oldest archive). This eliminates possibility that files older than 3 days
11/21/2010 4:10:25 AM >> # remain in the archive. Use the Passport folder on both sides of the load command to ensure no files get
11/21/2010 4:10:25 AM >> # erased on the laptop.
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> load "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:25 AM Load comparison: I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14 <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:25 AM >> select rt.all
11/21/2010 4:10:25 AM >> option confirm:yes-to-all
11/21/2010 4:10:25 AM >> delete recyclebin=no rt
11/21/2010 4:10:25 AM Deleted I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\____Archived 2010-11-21_time-03-40-30\ZeroLengthFile.txt
11/21/2010 4:10:25 AM Deleted I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\____Archived 2010-11-21_time-03-40-30
11/21/2010 4:10:25 AM Successfully deleted 2 items. Completed in 0.05 seconds.
11/21/2010 4:10:25 AM >> #
11/21/2010 4:10:25 AM >> # 2. copy new timestamp folder unconditionally (before newer than 3 days time filter is applied)
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:26 AM Load comparison: C:\Users\don\Documents\Burtis Group Files <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:26 AM >> filter "zzzReserved4Timestamp\"
11/21/2010 4:10:26 AM >> select left.all.folders
11/21/2010 4:10:26 AM >> option confirm:yes-to-all
11/21/2010 4:10:26 AM >> copy lt->rt
11/21/2010 4:10:26 AM Copied C:\Users\don\Documents\Burtis Group Files\zzzReserved4Timestamp\ZeroLengthFile.txt to I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\zzzReserved4Timestamp
11/21/2010 4:10:26 AM Successfully copied 1 items. Completed in 0.03 seconds.
11/21/2010 4:10:26 AM >> filter none
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> # 3. Synchronize the new files with the oldest archive of new files (the "-14" version)
11/21/2010 4:10:26 AM >> #
11/21/2010 4:10:26 AM >> load "C:\Users\don\Documents\Burtis Group Files" "I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14"
11/21/2010 4:10:26 AM Load comparison: C:\Users\don\Documents\Burtis Group Files <-> I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14
11/21/2010 4:10:26 AM >> expand all
11/21/2010 4:10:26 AM >> filter cutoff:<3days
11/21/2010 4:10:26 AM >> select lt.files
11/21/2010 4:10:26 AM >> copy lt->rt
11/21/2010 4:10:26 AM >> filter cutoff:none
11/21/2010 4:10:26 AM >>
11/21/2010 4:10:26 AM >> collapse all
11/21/2010 4:10:26 AM >> select rt.all.folders
11/21/2010 4:10:26 AM >> rename regexpr "zzzReserved4Timestamp" "____Archived 2010-11-21_time-04-10-26"
11/21/2010 4:10:26 AM Renamed I:\__Time_based_archives\__BGnew-PreMirror\BGnew-PreMirror-14\zzzReserved4Timestamp to ____Archived 2010-11-21_time-04-10-26
11/21/2010 4:10:26 AM Successfully renamed 1 items. Completed in 0.02 seconds.
11/21/2010 4:10:26 AM >>
11/21/2010 4:10:27 AM >> expand all
11/21/2010 4:10:27 AM >> select empty.folders
11/21/2010 4:10:27 AM >> delete recyclebin=no rt
Note that using the mirror sync command, I get copies of all of the folders from heh source, but all of them (except the "____Archived 2010-11-21_time-04-10-26" folder which was copied separately as "zzzReserved4Timestamp" then renamed) are empty - even folders that contain files newer than 3 days old (I even inserted a new file during this round of testing to ensure one file was way less than 3 days old. (The delete empty folders portion of the script was added later to remove the empties. It works fine, and I determined that all of the deleted folders were in fact empty before deletion.
Please help me understand what I'm doing wrong.
Don Burtis