#!/bin/sh # # Copyright (C) 2023 dwlr # # BSD 3-Clause License (BSD-3-Clause) # See LICENSE for details set -e echo "$(xclip -sel clipboard -o -r -t text/uri-list | cut -d':' -f2- | tr -d '\r')" \ | while IFS= read -r path do if [ -e "${path}" ]; then cp -v -r "${path}" "$(basename ${path})" fi done