So I am using a function in python which is being called in Robotframework to copy a file from a source to destination I have used os.path.join() and os.listdir() and os.path.normpath() to get access to the folder and copy using shutil But everytime I get this error
WindowsError: [Error 3] The system cannot find the path specified: '\\10.28.108.***\\folder\\folder2\\out/*.*'
My code
from pathlib import Path
import shutil
import os
#filename = Path ("\\10.28.108.***\folder\folder2\out\001890320181228184056-HT.xml")
source = os.listdir("\\10.28.108.***\folder\folder2\out")
destination = "\\10.28.108.***\folder\folder2\"
for files in source :
if files.endswith(".xml"):
shutil.copy(files, destination)