Inspired by this question on StackOverflow: How can I determine a file’s true extension/type programatically? This linked file is a GIF image...OR IS IT?!? If you add a .zip extension, suddenly it's a ZIP archive! This trick brought to you by the GIF and ZIP specifications: GIF has headers in the front, ZIP has headers in the back, both ignore data not specified in headers. cat image.gif archive.zip > what_type This also works for Windows Executables and ZIP archives, allowing for Neat Tricks: I have a Java application which works cross-platform, but I need a Windows installer for some users. So, normal users click the installer (which unpacks the files from the archive at the end of itself; NSIS+zip plugin can do this flawlessly), power users can rename the installer to installer.exe.zip and extract the files by hand (which is kind of useful on Linux and Mac OS). This way, I don't have to package the files separately, users only see one file and everyone is happy ;)