在日期之间创建仅包含最后修改过的文件的ZIP / RAR文件(WINDOWS)

I have modified some php code files which are part of a project that lives in a directory with subdirectories. Now I'd like to send a zip file which contains only the files that were modified last to another person. Like:

/c/index.php

/c/out/inc_out.php

/sales.php

Is there an easy way to select a date range and create a ZIP/RAR archive with the latest modified files? I'm on Windows.

Why using a script for this task? WinRAR supports such tasks directly.

  • Start WinRAR.
  • Navigate to the folder with the modified files to compress into a ZIP or RAR archive file.
  • Click on command Add.
  • Select the tab Time.
  • On list item Include files select either Newer than or Modified after.
  • Enter the appropriate time values according to the selected option.
  • Click on button OK.

WinRAR adds to the archive now only files with a last modification time according to the specified time values.

See help of WinRAR or file Rar.txt in program files folder of WinRAR if creating the ZIP/RAR archive file should be done from command line. There are explained the command line options -ta<date> (modified after) and -tn<time> (newer than).