Jump to content

How windows explorer forces to open file in ZIP mode


Recommended Posts

Posted (edited)

HI all,

Here is the problem. I have a zip file that always renamed by our internal program to different extension

for ex:

file.zip renamed to file.1 ... .2.. and others...

How to open the file (file.1 - a zip file originally) in a way that it will show another window having the files inside?

I used the start->run command:

explorer d:\file.zip (this is ok, it will directly open the zip file and shows the content)

explorer d:\file.1 (it will ask you to "do you wan to open...?" then "do you wan to save?."... although explorer still recognize it is a zip file because it shows a correct zip icon whenever it asked a question, but it doesn't show the content in the file, unless you rename it again to zip file).

It might be a stupid question, but I really need to solve this as this is a part of my system development requirement.

If it can't be done in explorer or any other windows built in application, perhaps any API? (but would be nice to use the available exe file in windows)

P.S.

They don't want to install any compressor application if it is built in :no:

everistically

Edited by everistically

Posted

You can do this in two ways.

You need to type this in Run every time you need to open a file that you think is a zip file:

rundll32.exe zipfldr.dll,RouteTheCall "filename"

where, filename is the full name and path of your file.

A more permanent method would be to associate all .1, .2 files etc as zip files:

ASSOC .1=CompressedFolder

ASSOC .2=CompressedFolder

ASSOC .3=CompressedFolder

etc

Of course, if this is a pattern, ie, say it goes on till 99 or something, you could type this command in the Command Prompt to automate it.

FOR /L %i IN (1,1,99) DO @ASSOC .%i=CompressedFolder

this command would associate all file extensions starting from .1 , increasing one at a time, till .99. :)

Posted

Oh man! you are AMAZING!!!...

I haven't tried it yet but I believe it's a work of an expert. Wow... How can I repay you.. :)... Do you have a girlfriend.. LOLZ ... :thumbup

Thanks man... this is huge help...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...