Click to See Complete Forum and Search --> : upload


retesh_gondal
07-30-2003, 03:20 AM
I need to upload text file from my hard disk to web server through ASP using "input type=file".PLz help me on tis topic.

Thanks

RETESH

CrazyGaz
07-30-2003, 08:40 AM
assuming that you used.
<input type="file" name="txtFile">

then this will work.

<%
txtFile = Request.form("txtFile")
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile(txtFile)
f.Copy("FOLDER TO COPY TO/text.txt")
set f=nothing
set fs=nothing
%>

Gaz.

Bullschmidt
08-05-2003, 12:03 AM
Or here is a resource for letting the user upload a file which is something that was unfortunately not built into ASP:

ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
http://aspzone.com/articles/160.aspx

retesh_gondal
09-11-2003, 01:35 PM
i need to upload file from my hard disk to webserver using ASP...plz....help....in this context...!! thx...

Bullschmidt
07-22-2005, 12:29 PM
i need to upload file from my hard disk to webserver using ASP...plz....help....in this context...!! thx...


That IS the context of the above link I provided. :)

buntine
07-22-2005, 09:46 PM
To upload from the client to the server, rather than just moving files around form one side, you should take a look at what Paul posted.

If your server supports ASPUpload, you can check out www.aspupload.com for some helpful documentation.

Regards.