If you have 7-Zip installed, you can use the 7z.exe utility to compress text files quickly. : 7z a archive_name.7z "mytextfile.txt" Use code with caution. Copied to clipboard
:You can "prepare" a text file (e.g., list.txt ) that contains the names of all the files you want to compress, each on a new line, and then run: 7z a archive_name.7z @list.txt Use code with caution. Copied to clipboard 2. Preparing a List File ( -scs switch)
For more advanced configurations, you can refer to the official 7-Zip FAQ or the Command Line User's Guide .