Announcement

Collapse
No announcement yet.

Slightly strange behaviour in mirror script.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Slightly strange behaviour in mirror script.

    #log the script
    log verbose append:"c:\BCScripts\log.txt"
    #set the comparison criteria
    criteria timestamp size
    #load source and target
    load %1 %2
    #filter to only include source files, ignore CVS subdirectories
    filter "*.htm;*.html;*.gif;*.aspx;*.config"
    #Sync the local files to the web site, creating empty folders
    sync mirror:lt->rt

    I have the above script from the help file which I am using to sync an ASP.NET website. I am passing in the following parameters:

    %1 - C:\DeployAreas\FaxRocket\0.0.0.0\
    %2 - C:\Inetpub\wwwstaging\faxrocket\

    I only want to mirror the folders and files below the base path. Instead I get C:\Inetpub\wwwstaging\faxrocket\0.0.0.0 created. Is there any way that I can only mirror below the base path?

  • #2
    Re: Slightly strange behaviour in mirror script.

    This should work. The script you listed will copy anything in "C:\DeployAreas\FaxRocket\0.0.0.0\" to the folder "C:\Inetpub\wwwstaging\faxrocket\".

    The script will only copy files under the 0.0.0.0 folder.

    The only way a C:\Inetpub\wwwstaging\faxrocket\0.0.0.0 folder will be created by the script is if you have a folder named "C:\DeployAreas\FaxRocket\0.0.0.0\0.0.0.0\" on the source side.

    If this isn't the behavior you're seeing, double check the command you're using to call the script. It should be:
    bc2.exe @script.txt "C:\DeployAreas\FaxRocket\0.0.0.0\" "C:\Inetpub\wwwstaging\faxrocket\"
    Chris K Scooter Software

    Comment


    • #3
      Re: Slightly strange behaviour in mirror script.

      It was my fault. I made an error in the way I called BC 2. Beyond Compare works perfectly.

      Comment

      Working...
      X