I am using macro to zip all files in a folder. When i open the zip file, date of modified becomes the date I ran the macro. When I create zip files manually, date of modified preserves original files date. Here is the code I am using. How can i preserve the original modified date in zip file?
ods package(newzip) open nopf;
%do j = 1 %to &cnt;
ods package(newzip) add file="&dir.&&name&j" mimetype="application/x-compress";
ods package(newzip) publish archive properties(archive_name="&zipnme..zip" archive_path="&ziploc");
%end;
ods package(newzip) close;
Retaining timestamps for ZIP files has been discussed before on SAS Communities:
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.