Touch Script Example

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • planecrash
    Visitor
    • Jan 2012
    • 3

    Touch Script Example

    This is my current script, and it is working...

    # Turn logging on
    log normal append:C:\build\Logs\FTP\%date%.txt

    # Set comparison criteria
    criteria CRC

    # Exclude certain file types
    filter "-.\training\"

    # Runs in background so needs permission for all dialog boxes
    option confirm:yes-to-all

    # Point to local and remote folder
    load %1 %2

    # Perform synchronization
    sync create-empty mirror:lt->rt
    I would prefer to use timestamp and size criteria instead as these are much faster, but then I run into the whole timestamp/ftp issue that the touch command is meant to address. Yesterday I spent hours of trial and error trying to figure out the proper sequence/syntax to use the touch command. I saw something like this posted by a scooter team member in another post...
    # Turn logging on
    log normal append:C:\build\Logs\FTP\%date%.txt

    # Set comparison criteria
    criteria timestamp size

    # Exclude certain file types
    filter "-.\training\"

    # Runs in background so needs permission for all dialog boxes
    option confirm:yes-to-all

    # Point to local and remote folder
    load %1 %2

    # Perform synchronization
    sync create-empty mirror:lt->rt

    # Update Timestamps
    expand all
    select all
    touch lt->rt
    But that had no effect. Also why did that example select all instead of say "select rt.diff.files"? Please help me understand the proper usage of the touch command in scripting.

    Thanks in advance,

    PC
  • planecrash
    Visitor
    • Jan 2012
    • 3

    #2
    Actually I think I've narrowed down my problem to a timezone issue, and don't even need to use the touch command. Though if you'd like to provide an example of the touch command in my particular case, it might be useful to someone else in the future, as a good example is difficult to locate.

    Comment

    • Zoë
      Team Scooter
      • Oct 2007
      • 2666

      #3
      Hi planecrash,

      The commands you added are correct. The example used "select all" instead of "select rt.diff.files" because the person asking about it was specifically trying to preserve folder timestamps too.

      If you're only interested in timestamps on files you usually won't need to set them explicitly after a copy. BC will copy timestamps along with the file data if it's able to. On FTP, if the timestamps aren't copied, it's usually because the FTP server doesn't support it and an explicit "touch" command shouldn't have any effect either.
      Zoë P Scooter Software

      Comment

      • planecrash
        Visitor
        • Jan 2012
        • 3

        #4
        ty

        Thank you for your reply.

        Comment

        Working...