Copy file from one location to another the user specifies.

  • Thread starter Thread starter Thomasa Gregg
  • Start date Start date
T

Thomasa Gregg

I am trying to find a way to allow the user to select a folder on the client
machine and then use that information to move a file from the server into
that folder. I am not sure if this is the correct forum to ask this
question. If not please direct me to the correct one.

Any help would be appreciated.
 
don't know if this helps, but if the file was the result of a DB query
(or something else you would re-create on the fly) then why not get
them to save the file?

Create a blank aspx page.

on the Parent, create a save button and then server.transfer to the
blank page.

In the OnLoad event put in this code and the user will be prompted
with the generic open/save location dialog. If you do it for them
once and select "Save" it will stay like that.



Dim strLineOut As String
Dim strLineCount As String
Dim iLineCount As Integer

Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", _
"attachment; filename=""Daily" & Format(Now(),
"ddMMyyyy") & ".csv""")
Response.Clear()

'<create objDS somewhere above this >
For Each objDR In objDS.Tables(0).Rows
iLineCount += 1
strLineCount = Format(iLineCount, "0000")
strLineOut = strLineCount & Trim(objDR("Author"))
& vbCrLf
Response.Write(strLineOut)
Next
Response.End()
End Sub
 
Back
Top