if you need to send the file through the webserver from the other machine you could try something like this
Code:
<%
filename = "d:\testfile.txt"
sendfile filename
function sendfile(filename)
dim oStream,oFso,oFile
set ofso = createobject("scripting.filesystemobject")
if ofso.fileexists(filename) then
set ofile = ofso.getfile(filename)
response.clear
Response.AddHeader "Content-Disposition", "attachment; filename=" & ofile.name
Response.AddHeader "Content-Length", ofile.size
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
set ofile = nothing
set oStream = createobject("adodb.stream")
oStream.open
oStream.type = 1
oStream.loadfromfile filename
response.binarywrite ostream.read
oStream.close
end if
end function
%>
not sure whether you'll need to map the drive or not. depends whether an ado stream object can use a UNC path or not (which i've not tried).
you might also want to change the headers being sent. at the moment it forces a download prompt to appear.
Bookmarks