Software & scripting

Add links (.lnk) to zip files

.lnk (Link) files are very usefull as they can link to both files and directories.

However, somehow the GUI tools for zipping .lnk files tend to compress the .lnk target or completely nothing but, not the .lnk itself.

The 7z command-line comes to the rescue:

."C:\Program Files\7-Zip\7zG.exe" a -tzip lnk-files.zip *.lnk

will just add all links within the folder to the lnk-files.zip.

Unpacking the zip using the GUI works fine though.