Visual Basic - RECUPERAR DATOS DE UN ARCHIVO

Life is soft - evento anual de software empresarial
 
Vista:

RECUPERAR DATOS DE UN ARCHIVO

Publicado por aps (18 intervenciones) el 25/08/2004 18:46:53
Hola a todos, queria saber como se puede recuperar informacion de cualquier fichero, como su fecha de creacion / modificacion, lo que ocupa, ...

Un Saludo y gracias a todos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:RECUPERAR DATOS DE UN ARCHIVO

Publicado por nye (40 intervenciones) el 26/08/2004 18:11:48
Hola!!

Puedes usar el File System Object (FSO), te pongo un ejemplo y una web donde esta todo lo que necesitas...

http://www.juicystudio.com/tutorial/vb/files.asp#file

Private Sub displayFileInfo(ByVal fileName As String)
Dim fso As New FileSystemObject
Dim fileSpec As File
Dim strInfo As String
Set fileSpec = fso.GetFile(fileName)
strInfo = fileSpec.Name & vbCrLf
strInfo = strInfo & "Created: "
strInfo = strInfo & fileSpec.DateCreated & vbCrLf
strInfo = strInfo & "Last Accessed: "
strInfo = strInfo & fileSpec.DateLastAccessed & vbCrLf
strInfo = strInfo & "Last Modified: "
strInfo = strInfo & fileSpec.DateLastModified
MsgBox strInfo, vbInformation, "File Information"
Set fileSpec = Nothing
End Sub

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar