
01/08/2005, 11:38
|
| | Fecha de Ingreso: junio-2005
Mensajes: 114
Antigüedad: 19 años, 10 meses Puntos: 0 | |
habitualmente uso el GuardarComo , lo uso así
set objFich = objUpload.Ficheros("file")
'Primero, en nuestro directorio actual con el nombre que tiene
objFich.GuardarComo Session("NombreArchivo"), Server.MapPath("../../archivos/")
set objFich = nothing
Este es el código de la funcion en xelupLoad.asp
Public Sub GuardarComo(nombrefichero, ruta)
Dim oFSO, oFich, i
if ruta = "" or nombrefichero = "" then Exit Sub
if Mid(ruta, Len(ruta)) <> "\" then '"
'añado la ultima barra a la ruta
ruta = ruta & "\" '"
end if
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
if not oFSO.FolderExists(ruta) then Exit Sub
set oFich = oFSO.CreateTextFile(ruta & nombrefichero, true)
for i = 1 to LenB(Datos)
oFich.Write Chr(AscB(MidB(Datos, i, 1)))
next
oFich.Close
set oFSO = nothing
End Sub
No sé si hay algo diferente, pero a mi si me funciona.
Slds. |