Ver Mensaje Individual
  #11 (permalink)  
Antiguo 05/08/2008, 07:58
Avatar de OceanBorn
OceanBorn
 
Fecha de Ingreso: agosto-2008
Mensajes: 7
Antigüedad: 16 años, 8 meses
Puntos: 0
Respuesta: Error en Upload ASP

ok, entonces algo asi?

<%
Dim path = server.MapPath(".") & "\"

Set Upload = Server.CreateObject("Persits.Upload.1")
Count= Upload.Save(path)
%>
<% = Count %> ficheros subidos.
<%
Dim FSO, Fich , NombreAnterior, NombreNuevo,
'Inicialización
NombreAnterior = imagen
NombreNuevo ="Nuevo.jpg"

' Instanciamos el objeto
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
' Asignamos el fichero a renombrar a la variable fich
Set Fich = FSO.GetFile(path & NombreAnterior)
' llamamos a la funcion copiar,
'y duplicamos el archivo pero con otro nombre
Call Fich.Copy(path & NombreNuevo)
' finalmente borramos el fichero original
Call Fich.Delete()

Set Fich = Nothing
Set FSO = Nothing


%>
<%
Set Upload = Nothing
%>

los valores que le asgino son
Dim FSO, Fich , NombreAnterior, NombreNuevo,
'Inicialización
NombreAnterior = imagen
NombreNuevo ="Nuevo.jpg"


esta mal? no entiendo mucho :(