Python Forum
Failing to copy file from a network to a local drive
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Failing to copy file from a network to a local drive
#1
Hi,
I'm trying to copy files from a network folder.
For some reason my code produces an error:
import os
import shutil

fname = 'somelog_file.txt'
p04 = 'D:\\JFLogs\\p04\\'  ## local folder ##
h04 = '\\\\FF04OBS0004\\c$\\dir\\subdir\\' 

fto_download = h04+fname
print (fto_download)
shutil.copy(fto_download, p04) 
Any help appreciated!
Thank you!
Oshadha likes this post
Reply


Messages In This Thread
Failing to copy file from a network to a local drive - by tester_V - Jan-19-2021, 04:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Failing to connect by 'net use' tester_V 1 163 Apr-20-2024, 06:31 AM
Last Post: tester_V
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 277 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
Question How to get a removable disc type in drive Daring_T 12 1,237 Feb-11-2024, 08:55 AM
Last Post: Gribouillis
  Copy Paste excel files based on the first letters of the file name Viento 2 442 Feb-07-2024, 12:24 PM
Last Post: Viento
  Input network device connection info from data file edroche3rd 6 1,048 Oct-12-2023, 02:18 AM
Last Post: edroche3rd
  open python files in other drive akbarza 1 696 Aug-24-2023, 01:23 PM
Last Post: deanhystad
  Integrating Google Drive in App Lahearle 0 472 Jul-19-2023, 05:51 PM
Last Post: Lahearle
  is it possible to copy image from email and place into excel file? cubangt 3 1,272 Nov-30-2022, 05:11 PM
Last Post: snippsat
  Please help me [copy and paste file from src to dst] midomarc 2 1,019 Nov-24-2022, 10:13 PM
Last Post: midomarc
  code to send attachments contained on the drive. stefanoste78 1 859 Oct-12-2022, 02:16 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020