PDA

View Full Version : Script works and stops working.


08-Mar-2005, 07:46 AM
I used the following script to compare 2 directories on my desktop:

load c:\robocopy\s c:\robocopy\t
log verbose log.txt
criteria rules-based
compare
select diff.files orphans.files
file-report layout:statistics options:stats-tabular output-to:robo_log.txt

I run the script with no errors "bc2.exe @script.txt". I change the layout to "xml" and get "Incorrect Parameters". I change the layout back to "statistics" and get "Incorrect Parameters". I have to reboot my workstation to get the script working again.

Thanks...

Chris
08-Mar-2005, 09:16 AM
log verbose log.txt
criteria rules-based
load c:\robocopy\s c:\robocopy\t
exand all
select diff.files orphan.files
#file-report layout:statistics options:stats-tabular output-to:robo_log.txt
file-report layout:xml output-to:robo_log.txt

Here's a script that worked on my system for the xml output. The options:stats-tabular is only valid for the statistics layout, so you'll get an error if you try to use it with the xml layout.

The correct keyword is also orphan.files rather than orphans.files.

I also added an expand all command to include any subdirectories in the comparison.

Last, I got rid of the compare command. The compare command operates on the currently selected files, so unless you have something selected it shouldn't do anything. When you set criteria, that implies a comparison anytime something is modified (loaded, folders expanded, etc). The compare command is useful for a one-time comparison of selected files.