How can I create a .zip compressed archive in Windows from the command-line that preserves symlinks?
I'm trying to create .zip file in PowerShell that includes a relative symlink from one file to another file in that archive, but I either encounter an error or the shortcut turns into a non-symlink file after extraction.
mkdir test
cd test
echo 'foo' > bar
cmd /C mklink bar_link bar
cd ..
Compress-Archive -DestinationPath test.zip -Path test
What are the commands I should use to create a .zip file from a directory that contains a relative symlink to a file in the directory to be archived?
tarpreserves symlinks.. – Michael Altfield Oct 05 '20 at 04:44.zipwhat other native Windows archive formats support symlinks? – Michael Altfield Oct 05 '20 at 04:47provision.shbatch script to the.zipfile that, when double-clicked in Windows, it creates the shortcut and deletes itself https://github.com/BusKill/buskill-app/blob/1a79dc07df39a2622ad32e042c21332a34cbf458/build/usb/usbDrive.sh#L206-L264 – Michael Altfield Aug 14 '22 at 10:28