Copy file from one location to another the user specifies.

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.
 
B

bmckeon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top