I recently wrote this script to download files from a file server using a folder path. For example the "LINK" field has values such as this: "\\wapgis61\Scans\101-005\101-005.pdf". We have recently changed the source data to to reference a virtual directory which uses URL's. For example, the path referenced earlier is accessed with a URL like this: http://wapgis61/Scans/101-005/101-005.pdf . Does anyone know how to modify this script to extract files that a referenced with a URL instead of a UNC path?
import arcpy
import os
import shutil
fc = arcpy.GetParameterAsText(0)
dest_path = arcpy.GetParameterAsText(1)
print(fc)
cursor = arcpy.SearchCursor(fc)
for row in cursor:
field = "LINK"
link = (row.getValue(field))
head, tail = os.path.split(str(link))
print ("Downloading: " + tail)
shutil.copy(link, dest_path)
print("Download Complete")