by sysctrl2 » Sat Nov 09, 2024 2:05 am
El uso de variables hash facilitan la vida
- Code: Select all Expand view RUN
FUNCTION Main()
LOCAL hFile := GetFileInfo("MiPrograma.exe")
? "FECHA DE CREACIÓN DE MI PROGRAMA ES: " + dtoc( hFile["date"] ) , "A LAS " + hFile["time"]
RETURN NIL
FUNCTION GetFileInfo(cFileName)
LOCAL dFecha := date()
LOCAL aFiles := Directory(cFileName)
LOCAL hFileInfo := {=>}
hFileInfo["name"] := ""
hFileInfo["size"] := 0
hFileInfo["date"] := date()
hFileInfo["time"] := time()
hFileInfo["attr"] := .t.
IF len(aFiles) > 0
hFileInfo["name"] := aFiles[1,1] // Nombre del archivo
hFileInfo["size"] := aFiles[1,2] // Tamaño
hFileInfo["date"] := aFiles[1,3] // Fecha
hFileInfo["time"] := aFiles[1,4] // Hora
hFileInfo["attr"] := aFiles[1,5] // Atributos
ENDIF
RETURN (hFileInfo)
Cesar Cortes Cruz
SysCtrl Software
Mexico
' Sin +- FWH es mejor "