Zipping up a set of files listed in a .txt file

I have a selected set of files spanning across folders and subfolders that I would like to package into one zip e.g. list of modified files for a source control check-in operation.
I have the list of file paths in a .txt file.

I had an old version of PowerArchiver command line utility on my machine. After some tinkering with the console help... ta da!

>"PACOMP.EXE" -p -a [] @ListOfFiles.txt

-p : To store relative paths of zipped files.
-P : To store absolute paths of zipped files
ListOfFiles.txt : A text file with all the files you wanted to zip up : Name of zip file to be created

The resulting zip had just those files that I wanted and the zip can be opened by any extraction utility like WinZip, etc.
Each filepath should be on a new line in the text file.

Noting down for my reference.

  • If you have some spaces or tabs at the beginning of the filepath, i think that file gets skipped.
  • Make sure of case uniformity in the List of files. It messes up with some files zipped with absolute path. To be safe, check relative paths by opening up the zip once.
    • d:\myfolder\..
    • D:\MyFolder\.. [No No.. use one of these throughout the list]