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?