The problem (probably a bug) is this:
makecab will store the file creation date as the modification date of the files inside the cabinet.
People can try this:
1. Assume that you have the program to change the file date, such as NirSoft's File Date Changer.
2. Create a text file named "test.txt".
3. Use the File Date Changer to change the file created date to 1/1/2002, and the modified date 4/4/2004.
makecab /d compressiontype=LZX /d compressionmemory=21 test.txt test.tx_5. Open the cabinet with an archive viewer (such as 7-Zip), and check the modified date of test.txt.
I tested this with makecab.exe 5.1.2600.5512(WindowsXP), and the date is 1/1/2002 instead of 4/4/2004.
[Update: Only this version has this problem, other version of makecab.exe works fine.]
This problem become serious to me when I make cabinets across different folders. I often copy the files between folders and copying the files changes the file creation date of the new file. Then, makecab both files, and the two cabinets will be different even though their contents are the same file.
In contrast, cabarc.exe (another cabinet utility), did this right. In the step 4, trying this instead of makecab will give you the correct file modified date.
cabarc /m LZX:21 N test.tx_ test.txt
HFSLIP could use another version of makecab or cabarc here to eliminate the problem.
Edited by Explorer09, 18 April 2012 - 08:34 PM.