copy file over LAN

A

Astan Chee

Hi,
I have a file on another machine on the local network (my machine and
local machines are on windows) and I want to copy it locally. Now the
machine requires authentication and when I try to do a
import shutil
shutil.copy(r'\\remotemachine\c$\temp\filename',r'C:\folder\test.txt')
and it gives me a IOError: [Errno 13] Permission denied: error, which I
expect. How do I provide authentication to copy this file?
Thanks for the help.
Cheers
Astan

--
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."


Animal Logic
http://www.animallogic.com

Please think of the environment before printing this email.

This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
 
T

Teja

Hi,
I have afileon another machine on the localnetwork(my machine and
local machines are on windows) and I want tocopyit locally. Now the
machine requires authentication and when I try to do a
import shutil
shutil.copy(r'\\remotemachine\c$\temp\filename',r'C:\folder\test.txt')
and it gives me a IOError: [Errno 13] Permission denied: error, which I
expect. How do I provide authentication tocopythisfile?
Thanks for the help.
Cheers
Astan

--
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."

Animal Logichttp://www.animallogic.com

Please think of the environment before printing this email.

This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.

Hi,

Is the folder where the file is present i.e. "temp" in your case,
shared????
Can you share it and try it??

I tried this way and it worked!

import shutil

shutil.copyfile(r'\\129.124.66.112\Samplesharedfolder\samplefile.txt',
r'C:\\Test\\temppp.txt')

Try this way and let me know
 
Z

zugnush

Hi,
I have afileon another machine on the localnetwork(my machine and
local machines are on windows) and I want tocopyit locally. Now the
machine requires authentication and when I try to do a
import shutil
shutil.copy(r'\\remotemachine\c$\temp\filename',r'C:\folder\test.txt')
and it gives me a IOError: [Errno 13] Permission denied: error, which I
expect. How do I provide authentication tocopythisfile?
Thanks for the help.
Cheers
Astan
Please think of the environment before printing this email.
This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.

Hi,

Is the folder where the file is present i.e. "temp" in your case,
shared????
Can you share it and try it??

I tried this way and it worked!

import shutil

shutil.copyfile(r'\\129.124.66.112\Samplesharedfolder\samplefile.txt',
r'C:\\Test\\temppp.txt')

Try this way and let me know

I just discovered that this works for python upload into sharepoint
too :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top