Jun-01-2021, 06:51 PM
Hi,
I'm trying to copy logs from a network drive.
There is a text file it holds all the Path\file lines for files copy, like this:
Then I build a 'destination' veriable :
And they look ok.
But when I run 'shutil.copy' it produces an error:
I have never seen it before...
thank you.
I'm trying to copy logs from a network drive.
There is a text file it holds all the Path\file lines for files copy, like this:
\\\\nhkBCN1376\\d$\\logs\\Nhk\\ServiceHostLog.1.xml \\\\nhkBCN1376\\d$\\logs\\Nhk\\ServiceHostLog.2.xml ... \\\\nhkBCN1376\\d$\\logs\\Nhk\\ServiceHostLog.203.xmlI read the file and each line becomes my 'source' string.
Then I build a 'destination' veriable :
"D:\\ServiceHostLog\\"+machine_Name+"\\"+machine_Name+".xml"I print the 'source' and the 'destination' to make sure both Vars are ok.
And they look ok.
But when I run 'shutil.copy' it produces an error:
No such file or directory: '\\\\\\\\nhkBCN1376\\\\d$\\\\logs\\\\Nhk\\\\ServiceHostLog.1.xml'I got extra slashes introduced into the 'source' string
I have never seen it before...
thank you.