views:

27

answers:

1

I have a folder structure containing a number of documents, as well as a shortcut link to another file in the folder structure. (essentially the file structure maps like a graph). If I zip up these files in Windows, the shortcut will point to the right file when the archive is uncompressed somewhere else.

Now, I want to be able to do this using the System.IO.Packaging stuff... this requires that I put the each file in a stream to tie it to the zip file. The problem is shortcut files (.lnk) apparently aren't actually files (if you do a file.exist on it, its not there). My normal method of...

System.IO.FileStream(shortcut, System.IO.FileMode.Open)

...will not work. So how would I add a shortcut to a zip package?

+1  A: 

A ZipPackage isn't a regular Zip file, but a file meant to be used by new Office XML-based file format (docx, xlsx, etc).

If you want to zip something, you should to use anotehr library, like #ziplib

Rubens Farias
sharziplib is awesome
AaronLS
ok got it to work
tbischel