Announcement

Collapse
No announcement yet.

Dumb newbie question: copy

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

  • Dumb newbie question: copy

    I've put together what I thought should be a pretty simple script, but it's not working for me. I used the sample on the website, but when I modify it it doesn't work. Here's what I got:

    This one works, but it doesn't do what I need. Another app is converting the PDFs that are being copied into JPEGs, but the sync detsroys them on the second script cycle. In any case this one works ...

    -----------------------------------
    # Turn logging on
    log normal "C:\Synclog.txt"
    # Set comparison criteria
    criteria timestamp size
    # Load the base folders
    load "\\magfileserv\NGMK4TestFiles\PDF_Proofs" "C:\Inetpub\wwwroot\PDF Proofs"
    #Make the target identical to the source
    #includes deleting files that only exist on the target side
    sync mirror:lt->rt
    ------------------------------

    But this one doesn't.
    --------------------------------
    log normal "C:\Synclog.txt"
    criteria timestamp size
    load "\\magfileserv\NGMK4TestFiles\PDF_Proofs" "C:\Inetpub\wwwroot\PDF Proofs"
    copy lt->rt
    ----------------------------------

    But there is no copying going on. Is there a syntax error here? What am I doing wrong?

  • #2
    Re: Dumb newbie question: copy

    The first script will delete files that only exist in the "C:\Inetpub\wwwroot\PDF Proofs" folder to make it identical to the source folder. To avoid affecting JPG files, use a filter.

    Code:
    log normal "C:\Synclog.txt"
    criteria timestamp size
    filter "-*.jpg"
    load "\\magfileserv\NGMK4TestFiles\PDF_Proofs" "C:\Inetpub\wwwroot\PDF Proofs"
    sync mirror:lt->rt
    For your second script, the copy command operates on the currently selected files. Adding a "select all" command will make the files copy, although this will copy everything, so it isn't as efficient as the mirror command.

    Code:
    log normal "C:\Synclog.txt"
    criteria timestamp size
    load "\\magfileserv\NGMK4TestFiles\PDF_Proofs" "C:\Inetpub\wwwroot\PDF Proofs"
    expand all
    select all
    copy lt->rt
    Chris K Scooter Software

    Comment

    Working...
    X