6

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
  • 64,768
  • 7
  • 111
  • 168
user66001
  • 1,228
  • 3
  • 14
  • 26

2 Answers2

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.

Neil Neyman
  • 276
  • 1
  • 9
  • Thanks for your answer Neil Neyman, however I already use 7-zip, and was just wanting to add a slight amount more functionality to the built-in options, for less-important compression operations, (unfortunately) without resorting to batch/scripting, which would also [seemingly require download of a command line zip utlitity](http://serverfault.com/questions/39071/does-windows-have-a-built-in-zip-command-for-the-command-line). – user66001 Sep 22 '13 at 21:42
  • P.S Was not suggesting moving the full-stop outside the brackets (IMO - So it ends the sentence, and not just the contents of the brackets... The code monkey in me) was a grammar error, I left out mention of it as it was a very minor change :) I do wonder if it might be British English's rules, given my country of origin, however. – user66001 Sep 22 '13 at 21:42
  • @user66001 gotcha. [That is exactly the issue!](http://blog.apastyle.org/apastyle/2011/08/punctuating-around-quotation-marks.html) I actually meant 'that one' so I revised it to clarify. Tablet typing is a pain and outputs a lot of garbage sometimes. – Neil Neyman Sep 22 '13 at 21:56
  • @user66001 I think you may be out of luck because that 0 byte file basically is like a shortcut. The compression utility uses zipfldr.dll and that particular built-in dll does not seem to have any additional functionality that would enable this. I did see some vbscript solutions on google. – Neil Neyman Sep 22 '13 at 22:35
  • Thanks for the link - Interesting. However, I do wonder if this is yet another seemingly subtle attempt made by Americans, to separate themselves from Britain, back when this country was founded (z's instead of s's; Date format; etc) :) – user66001 Sep 23 '13 at 05:31
  • Cool. Knowing about zipfldr.dll (How did you discover this was what was called?), allowed me to easily find http://stackoverflow.com/questions/30211/can-windows-built-in-zip-compression-be-scripted with VBA and VBS solutions. Still hoping someone with DLL hacking skills will see this thread sometime, however. – user66001 Sep 23 '13 at 05:48
1

I appreciate people usually frown up resurrecting old threads, but I found the question and potential solutions to be still relevant in 2023 as I was looking to do something very similar and stumbled across this thread.

I wanted to zip up around 135GB of files/folders to save space on a machine with a 120GB SSD and 500GB HDD. The data was on the HDD and zipping in-situ was understandably going to be a very slow process. The data was quite compressible yielding a 5-7x compression ratio.

I wanted to create the zip on the SSD to help get it done quickly but couldn't initially find a way using the Windows built in zip functionality as it always creates the zip in the same folder as the source.

The solution in the end was quite easy and may also be relevant to the original question. The steps are:

  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.

That's it.

cb2791
  • 31
  • 2