#include"stdafx.h" #include <stdio.h> #include <windows.h> #include<conio.h> int main(int argc, char** argv) { WIN32_FILE_ATTRIBUTE_DATA attr; SYSTEMTIME creation; if (argc < 2) return 1; GetFileAttributesEx(_T(argv[1]), GetFileExInfoStandard, &attr); FileTimeToSystemTime(&attr.ftLastWriteTime, &creation); printf("Created: %04d-%02d-%02d %02d:%02d:%02d\n" "Size: %d bytes\n", creation.wYear, creation.wMonth, creation.wDay, creation.wHour, creation.wMinute, creation.wSecond, attr.nFileSizeLow); _getch(); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)