7

Is it possible to change the “Send to Compressed (zipped) Folder" functionality to create the zip file in a pre set directory, rather than the current one?

Also, any information anyone can share about how this functionality works (The shortcut seems to open Compressed (zipped) Folder.ZFSendToTarget, which appears to be 0 byte file?!), would be appreciated.

Hennes
  • 65,804
  • 7
  • 115
  • 169
user66001
  • 1,319

2 Answers2

5

As you saw, the Windows built in zip functionality always creates the zip in the same folder as the source. However, there's a workaround:

  1. Create a dummy zip file on/in the destination drive/folder using the Windows built in "Send to/compressed (zipped) folder" functionality. I simply created one with a single line text file as zero length files are not supported by the Windows built in zipper.

  2. Open the zip folder

  3. Copy the source files/folders into the zip file. Windows adds the source files/folders to the zip file which can be on a different drive / in a different folder to the source files/folders.

Cadence
  • 103
cb2791
  • 91
  • 1
  • 3
2

One easy solution is to install 7-zip (or some other third-party tool, but 7-zip in particular is well-maintained and free and supports regular zip files as well as other formats.)

And on installation be sure the option is checked to make it the default handler for zip which will make it the handler for that compress files function also. But what really makes this a good solution IMO is it includes several configurable context menu options, including one for compress to a folder in a set location.

Another more difficult option if you don't want to use 7zip might be to create a batch file to zip from the command line then move to the right location. Then add this bat file to the context menu manually.

Editing and updating based on comments

The built-in compression utility is called "windows compressed folders" and is run using a very limited-functionality "zipfldr.dll" that does not include such capability as-is via rundll32.exe. However, there does seem to be a vbscript interface for it.

Also I should add that if you are looking to distribute an application or something like that without requiring a user to download another app, another possibility would be to include 7zip's dll as part of your own package, with the caveat that you'd need to adhere to the same gpl for your app.