def _copyFolder(syn, entity, destinationId, mapping=dict(), **kwargs):
    """
    Copies synapse folders

    :param entity:          A synapse ID of a Folder entity

    :param destinationId:   Synapse ID of a project/folder that the folder wants to be copied to
    
    :param recursive:       Decides whether to copy everything in the folder.
                            Defaults to True
    """
    oldFolder = syn.get(entity)
    recursive = kwargs.get('recursive',True)
    #CHECK: If Folder name already exists, raise value error
    search = syn.query('select name from entity where parentId == "%s"' % destinationId)
    for i in search['results']:
        if i['entity.name'] == oldFolder.name:
            raise ValueError('An item named "%s" already exists in this location. Folder could not be copied'%oldFolder.name)

    newFolder = Folder(name = oldFolder.name,parent= destinationId)
    newFolder.annotations = oldFolder.annotations
    newFolder = syn.store(newFolder)
    if recursive:
        entities = syn.chunkedQuery(entity% 'select id, name from entity where parentId=="%s"')
        for ent in entities:
            copied = _copyRecursive(syn, ent['entity.id'],newFolder.id,mapping, **kwargs)
    return(newFolder.id)

#Copy File
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseutils/copy.py/_copyFolder/swapped operands of `%`