Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2012
    Posts
    3

    Exclamation 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

  2. #2
    Join Date
    Jan 2012
    Posts
    3

    Default

    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.

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,528

    Default

    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

  4. #4
    Join Date
    Jan 2012
    Posts
    3

    Default ty

    Thank you for your reply.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •