Scripting Compare with "Copy NTFS File Permissions"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KarlYass
    New User
    • Apr 2016
    • 2

    Scripting Compare with "Copy NTFS File Permissions"

    I am wanting to run a simple folder compare script utilizing the MIRROR command, however with "Copy NTFS file permissions". This option is available within the gui but is not when you are scripting. I have also tried to set the option within session defaults.

    Is this possible?
    Sample Script:

    # Turn logging on
    log normal "C:\temp\scripts\logs\log_5_output.txt"
    # Set comparison criteria
    criteria timestamp size
    # Exclude certain file types
    filter "-*.*~"
    # Ignore prompts
    option confirm:yes-to-all
    # Load the base folders
    load "\\us1005-f01\d$\output" "e:\output"
    #Make the target identical to the source
    #includes deleting files that only exist on the target side
    sync create-empty mirror:lt->rt
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    The Copy NTFS permissions option is not exposed in scripting, but can be loaded in a saved session. If you save a session with no folders loaded, but the Session Settings are otherwise configured correctly, you can load it then load folders into it:
    option confirm:yes-to-all
    load "SessionWithCopyNTFSSD"
    load "\\us1005-f01\d$\output" "e:\output"
    sync ....

    If you update the global defaults in the graphical interface, scripting still uses the factory defaults every time for consistency, but script can load the GUI's default with:
    option confirm:yes-to-all
    load <default>
    load "\\us1005-f01\d$\output" "e:\output"
    sync ....
    Aaron P Scooter Software

    Comment

    • KarlYass
      New User
      • Apr 2016
      • 2

      #3
      Thank you!!

      Comment

      Working...