How to create an archive file which unarchives into the current folder

archiveusbzip

At the moment, if I create a TAR or ZIP file foo.tar – containing multiple files and directories – when I double click on the archive it creates a folder foo containing all of the archived items.

Is there a way to have an archive extract itself – when opened from Finder – so that the files are at the same level as the archive was?

I'm trying to distribute an archive which users can use to setup a USB drive with a custom icon etc, however this requires copying hidden files into the USB drive's root, so I can't just get them to "copy/paste from this network directory"

Best Answer

Unless I am mistaken (always a possibility), this behavior is set by the program extracting the archive file, not by the archive file itself.