Для справки:
utime выдает 0, если успешно, и -1 если провал.
Код: Выделить всё
#include <stdio.h>
#include <dirent.h>
#include <utime.h>
int main()
{
int test;
struct utimbuf tm1,tm2;
...
test = utime("C:\\sample2\\file1.txt",&tm2);
printf("%d\n",test);
test = utime("C:\\sample1\\file1.txt",&tm1);
printf("%d\n",test);
}
0
-1