BCX Console Demonstration Program s74.bas |
IF COMMAND$ = "" THEN PRINT "Usage: S74 FileName.Ext" END END IF PRINT COMMAND$, " ", FileDateTime$(COMMAND$) FUNCTION FileDateTime$(Filenam$) LOCAL fd AS WIN32_FIND_DATA LOCAL st AS SYSTEMTIME LOCAL fh AS HANDLE LOCAL Temp$ LOCAL Text$ Text$ = Filenam$ fh = FindFirstFile(Text$, &fd) IF fh = INVALID_HANDLE_VALUE THEN EXIT FUNCTION END IF FindClose(&fh) FileTimeToLocalFileTime(&fd.ftLastWriteTime, &fd.ftLastWriteTime) FileTimeToSystemTime(&fd.ftLastWriteTime, &st) GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, Text$, 255) Temp$ = Text$ GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, Text$, 255) FUNCTION = Temp$ & " " & Text$ END FUNCTION
Result:
Result not displayed for this example.