Oct-06-2020, 08:20 AM
Can you show the error when you try? This code moves a "foo" file to the "target" directory.
from pathlib import Path import shutil p = Path(".") for item in p.glob('**/*foo'): print(item) shutil.move(str(item), r"target")