def copy( args ):
    """copy src [src ...],  dest
    Copy files to/from the CE device
    """
    bRecurse = bVerbose = 0
    bMaintainDir = 1
    try:
        opts, args = getopt.getopt(args, "rv")
    except getopt.error, details:
        raise InvalidUsage(details)
    for o, v in opts:
        if o=="-r":
            bRecuse=1
        elif o=='-v':
            bVerbose=1

    if len(args)<2:
        raise InvalidUsage("Must specify a source and destination")

    src = args[:-1]
    dest = args[-1]
    # See if WCE: leading anywhere indicates a direction.
    if string.find(src[0], "WCE:")==0:
        bToDevice = 0
    elif string.find(dest, "WCE:")==0:
        bToDevice = 1
    else:
        # Assume copy to device.
        bToDevice = 1

    if not isdir(dest, not bToDevice):
        print "%s does not indicate a directory"

    files = [] # List of FQ (from_name, to_name)
    num_files = 0
    num_bytes = 0
    dialog = FileCopyProgressDialog("Copying files")
    dialog.CreateWindow(win32ui.GetMainFrame())
    if bToDevice:
        for spec in src:
            new = BuildFileList(spec, 1, bRecurse, _copyfilter, bMaintainDir)
            if not new:
                print (spec) % "Warning: '%s' did not match any files"
            files = files + new

        for full_src, src_info, dest_info in files:
            dest_name = os.path.join(dest, dest_info)
            size = src_info[5]
            print "Size=", size
            if bVerbose:
                print full_src, "->", dest_name,"- ",
            dialog.SetText(dest_name)
            dialog.Set(0, size/1024)
            bytes = CopyFileToCe(full_src, dest_name, dialog.CopyProgress)
            num_bytes = num_bytes + bytes
            if bVerbose:
                print bytes, "bytes"
            num_files = num_files + 1
    dialog.Close()
    print "%d files copied (%d bytes)" % (num_files, num_bytes)
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site-packages/win32/scripts/ce/pysynch.py/copy/swapped operands of `%`