I try to copy txt file from WinPC1 to WinPC2
In my WinPC1 i created local txt file in:
C:\temp\1.txt
I want to copy that txt file to windows network drive to folder:
OUT\temp
WinPC2 on WinPC1 seen:
- by net use like
nam1\\box1\\IKQ
- by explorer like
Z:\
so full paths are:
- full path witn net use will be
\\\\nam1\\box1\\IKQ\\OUT\\temp
- or in explorer will be
Z:\OUT\tmp
First of all I tried to use os:
copy C:\temp\1.txt Z:\OUT\tmp
- check it in cmd, it was sucsessfullos.system(r"copy C:\\temp\\1.txt Z:\\OUT\\tmp")
- try by python, it wasn't sucsessfull
Then I read about shutil, and try to use it: it didn't work too, try to copy like that:
shutil.copy(r'C:\temp\1.txt', "Z:\OUT\tmp")
shutil.copy(r'C:\temp\1.txt', "\\\\nam1\\box1\\IKQ\\OUT\\temp")
What i need to do?