Goal:
I have to compare two folder trees, FdrTreeA and FdrTreeB. FdrTreeA the active folder that is changing daily. FdrTreeB is stable, unchanging, until I decide to update it. Once a month, I want to use a BC script to produce a summary report that lists three things:
- Files on FdrTreeA that are not on FdrTreeB (left-orphans?)
- Files on FdrTreeA that are newer than the same named, same positioned, file in FdrTreeB (left-newer?)
- Files on FdrTreeB that no longer exist in FdrTreeA (right-orphans?)
I have written the following script:.
log "D:\mylogfdr\bc_log\mylog.txt"
criteria rules-based
filter *.*
load "D:\myfdr\root_a" "D:\myfdr\root_b"
expand all
select all.files
folder-report layout:summary options:display-left-newer-orphans,column-none title:MyTitle output-to:"D:\rpt\bc_rpt\my_smry.txt"
This script runs without error, but doesn't do what I need. The report only shows left-orphans, not left newer nor right-orphans. ("&" line joiner not shown because I did not need it in my text editor. It's all on one long folder-report line.)
Here is the report:
MyTitle
Produced: 2016-Jan-31 3:52:21 PM
Mode: Left Newer and Left Orphans
Left base folder: D:\myfdr\root_a
Right base folder: D:\myfdr\root_b
Left Orphan Files (2)
---------------------
2\2A.txt
2\2C.txt
---------------------
Left Newer Files (0)
---------------------
This report is incorrect because there is a file at "root_a\2\2B.txt" that is newer, time-wise and content-wise than it's counterpart in "root_b\2\2B.txt". You can see that it is not listed.
Because it seems there can be only one "display" parameter, I can't do this:
options:display-left-newer-orphans,display-right-orphans
As a result, the file "root_b\3\3C.txt" which doesn't exist in the root_a folder, is not listed as a right orphan.
How can I accomplish my goal in my script?
Thanks in advance.
I have to compare two folder trees, FdrTreeA and FdrTreeB. FdrTreeA the active folder that is changing daily. FdrTreeB is stable, unchanging, until I decide to update it. Once a month, I want to use a BC script to produce a summary report that lists three things:
- Files on FdrTreeA that are not on FdrTreeB (left-orphans?)
- Files on FdrTreeA that are newer than the same named, same positioned, file in FdrTreeB (left-newer?)
- Files on FdrTreeB that no longer exist in FdrTreeA (right-orphans?)
I have written the following script:.
log "D:\mylogfdr\bc_log\mylog.txt"
criteria rules-based
filter *.*
load "D:\myfdr\root_a" "D:\myfdr\root_b"
expand all
select all.files
folder-report layout:summary options:display-left-newer-orphans,column-none title:MyTitle output-to:"D:\rpt\bc_rpt\my_smry.txt"
This script runs without error, but doesn't do what I need. The report only shows left-orphans, not left newer nor right-orphans. ("&" line joiner not shown because I did not need it in my text editor. It's all on one long folder-report line.)
Here is the report:
MyTitle
Produced: 2016-Jan-31 3:52:21 PM
Mode: Left Newer and Left Orphans
Left base folder: D:\myfdr\root_a
Right base folder: D:\myfdr\root_b
Left Orphan Files (2)
---------------------
2\2A.txt
2\2C.txt
---------------------
Left Newer Files (0)
---------------------
This report is incorrect because there is a file at "root_a\2\2B.txt" that is newer, time-wise and content-wise than it's counterpart in "root_b\2\2B.txt". You can see that it is not listed.
Because it seems there can be only one "display" parameter, I can't do this:
options:display-left-newer-orphans,display-right-orphans
As a result, the file "root_b\3\3C.txt" which doesn't exist in the root_a folder, is not listed as a right orphan.
How can I accomplish my goal in my script?
Thanks in advance.
Comment