I need to create code that when an image (or file) is uploaded to the server using the admin section of a website, the file is copied automaticaly to a second server.
Well If your server(s) is/are on a network, then you could most likely use the same upload code, and just use the network path instead of the drive path. www.vzio.com
ASP WEB DEVELOPMENT
I had somewhat of the same problem.. What I did was use the WScript.Network object to dynamically map a network drive.. copy the image and unmap the drive..
<%
set netdrive = server.createobject("wscript.network"
set fso = server.createobject("scripting.filesystemobject"
netdrive.MapNetworkDrive ("Z:","\\network\path"
fso.CopyFile ("<source of first saved file>","z:\<path>\<filename>", true)
set fso = nothing
netdrive.RemoveNetworkDrive ("Z:"
Thanks Gorkem thats what i am looking for. I am getting an access denied error..I think it has something to do with the IUSER_ account not having privleges?????
I tried that but i get an error "type mismatch line 6" (netdrive.MapNetworkDrive "p:",.....)
**************************************************
<%
set netdrive = server.createobject("wscript.network"
set fso = server.createobject("scripting.filesystemobject"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.