'Action which moves the selected files and files in selected folders
to clipboard.'

def move_to_clipboard(self, request, files_queryset, folders_queryset):

    if (not self.has_change_permission(request)):
        raise PermissionDenied
    if (request.method != u'POST'):
        return None
    clipboard = tools.get_user_clipboard(request.user)
    check_files_edit_permissions(request, files_queryset)
    check_folder_edit_permissions(request, folders_queryset)
    files_count = [0]
    def move_files(files):
        files_count[0] += tools.move_file_to_clipboard(files, clipboard)
    def move_folders(folders):
        for f in folders:
            move_files(f.files)
            move_folders(f.children.all())
    move_files(files_queryset)
    move_folders(folders_queryset)
    self.message_user(request, (_(u'Successfully    moved    %(count)d    files    to    clipboard.') % {u'count': files_count[0]}))
    return None
