Hejsa....
Du kan bruge aspSmartUpload den er freeware - og kan det du der ønsker.
du kan hente den her:.
http://www.aspSmart.comHer er et eksempel hvori jeg selv har brugt det.
<%
\' Variables
\' *********
Dim mySmartUpload
Dim file
Dim Conn
\' Dim Rs
Dim intCount
intCount=0
\' Object creation
\' ***************
Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\")
\' Upload
\' ******
mySmartUpload.Upload
\' Only allow jpg or gif files
\' ***************************
mySmartUpload.AllowedFilesList = \"gif,jpg,pjpeg,jpeg\"
\' Only allow files smaller than 100000 bytes
\' *****************************************
mySmartUpload.MaxFileSize = 100000
\' Connect to the DB
\' *****************
Set Conn = Server.CreateObject(\"ADODB.Connection\")
curDir = Server.MapPath(\"../../profil/profil.mdb\")
Conn.Open \"DBQ=\"& curDir &\";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;\"
\' Open a recordset
\' ****************
strSQL = \"SELECT * FROM brugere WHERE brugernavn =\'\" & session(\"bruger\") &\"\'\"
Set Rs = Server.CreateObject(\"ADODB.recordset\")
Set Rs.ActiveConnection = Conn
Rs.Source = strSQL
Rs.LockType = 3
Rs.Open
\' Select each file
\' ****************
For each file In mySmartUpload.Files
\' Only if the file exist
\' **********************
If not file.IsMissing Then
\' Add the current file in a DB field
\' **********************************
file.FileToField Rs.Fields(\"FILE\")
Rs(\"FILENAME\") = file.FileName
\' Rs(\"newname\") = mySmartUpload.form(\"newname\")
Rs.Update
intCount = intCount + 1
End If
Next
\' Save the files with their original names in a virtual path of the web server
\' ****************************************************************************
\' intCount = mySmartUpload.Save(\"../profil/images\")
\' sample with a physical path
\' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded
\' ************************************
\' Response.Write(intCount & \" file(s) uploaded.<BR>\")
\' Destruction
\' ***********
Rs.Close
Conn.Close
Set Rs = Nothing
Set Conn = Nothing
Response.write(\"<meta http-equiv=\'refresh\' content=\'2;URL=bruger.asp\'>\")
%>
Mvh
Jack!!