Compress only specific files from a folder while preserving folder structure

Solution 1:

set path=%path%;C:\Program Files\7-Zip
7z a archive.7z -ir!MainFolder\*.srt

reference:
7z --help or 7z(without parameter)
7-Zip Command Line User's Guide