URGENTE: COPIAR ARCHIVOS.
Publicado por Pedro (20 intervenciones) el 17/10/2004 20:58:45
Alguien puede dicirme porque no me funciona, cual es el error en éste código. Lo que quiero es que me copie todos los archivos del directorio Futbol en el directorio Futbol 2004 (claro esta, al pulsar el boton). INCLUYO *.* PARA QUE ME COPIE TODOS LOS ARCHIVOS Y ME DICE QUE NO EMCUENTRA EL OBJETO O LOS ARCHIVOS.
Private Sub CommandButton3_Click()
Const Loc As String = " C:\ESCRITO\FUTBOL\*.* "
Const NewLoc As String = " C:\ESCRITO\FUTBOL\FUTBOL 2004\*.* "
If Dir$(Loc) = "" Then Exit Sub ' Si no hay archivos
SetAttr Loc, vbNormal
FileCopy Loc, NewLoc
Kill Loc
End Sub
Private Sub CommandButton3_Click()
Const Loc As String = " C:\ESCRITO\FUTBOL\*.* "
Const NewLoc As String = " C:\ESCRITO\FUTBOL\FUTBOL 2004\*.* "
If Dir$(Loc) = "" Then Exit Sub ' Si no hay archivos
SetAttr Loc, vbNormal
FileCopy Loc, NewLoc
Kill Loc
End Sub
Valora esta pregunta
0