使用Windows中的压缩文件夹功能压缩文件 [英] Zip files using the Compressed Folders functionality in Windows

查看:276
本文介绍了使用Windows中的压缩文件夹功能压缩文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要编写一个小的Windows应用程序(控制台或表单)(对于Windows

XP SP2和Windows Server 2003),这将检查文件夹中是否存在某些文件,如果它们存在,它将使用内置的

压缩文件功能压缩文件(与上下文菜单 - 发送给

-压缩(压缩)文件夹)。


我不能使用任何其他第三方工具(如winzip等)因为一些

非技术限制。


但是,我还没弄清楚如何使用zip功能。

Do我需要调用zipfldr.dll。 (在system32文件夹中)还是有另外一个

方式

来做它?


谢谢,

Mayank

Hi,

I need to write a small Windows application (console or forms) (for Windows
XP SP2 & Windows Server 2003), which will check a folder for the presence of
some files, and if they exist, it will zip the files using the inbuilt
Compressed files functionality of Windows (same as the Context Menu -Send to
-Compressed (zipped) folder).

I cannot use any other third party tool (like winzip etc.) because of some
non-technical constraints.

However, I have not been able to figure out how use the zip functionality.
Do I need to call "zipfldr.dll" (in system32 folder) or is there another
way
to do it?

Thanks,
Mayank

推荐答案

MadMonk< Ma ***** @ discuss.microsoft.comwrote:
MadMonk <Ma*****@discussions.microsoft.comwrote:

我需要编写一个小的Windows应用程序(控制台或表单)(对于Windows

XP SP2和Windows Server 2003),它将检查一个文件夹存在一些文件,如果它们存在,它将使用内置的

压缩文件功能压缩文件(与上下文菜单相同 - 发送到

-压缩(压缩)文件夹)。


我不能使用任何其他第三方工具(如winzip等)因为一些

非技术限制。


但是,我还没弄清楚如何使用zip功能。

我是否需要拨打zipfldr的.dll" (在system32文件夹中)还是有另外一种

的方法吗?
I need to write a small Windows application (console or forms) (for Windows
XP SP2 & Windows Server 2003), which will check a folder for the presence of
some files, and if they exist, it will zip the files using the inbuilt
Compressed files functionality of Windows (same as the Context Menu -Send to
-Compressed (zipped) folder).

I cannot use any other third party tool (like winzip etc.) because of some
non-technical constraints.

However, I have not been able to figure out how use the zip functionality.
Do I need to call "zipfldr.dll" (in system32 folder) or is there another
way to do it?



您能准确告诉我们非技术限制是什么吗?

正常解决方案是使用CSharpZipLib,一个免费的托管zip API -

但不知道你的约束细节,我们不知道

是否可以选择。


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复小组,请不要给我发邮件

Could you tell us exactly what the non-technical constraints are? The
normal solution would be to use CSharpZipLib, a free managed zip API -
but without knowing the details of your constraints, we can''t know
whether or not that''s an option.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


你好Jon,


我的客户不想要任何第三方应用程序/ dll /库

安装在运行此应用程序的(生产环境)服务器上。

此外,他们的另一个异议(对我来说似乎有效)是, 如果Windows

具有压缩/解压缩文件的内置功能,为什么我们需要安装/使用

第三方代码来实现相同的功能? br />

我知道上面的内容可能有争议,但这些是我面临的限制......


谢谢,

MadMonk


" Jon Skeet [C#MVP]"写道:
Hi Jon,

My client doesn''t want any "third-party" applications/dlls/libraries
installed on the (production environment) server where this app would run.
Also, another of their objections (which seems valid to me) is, "If Windows
has the inbuilt capability to zip/unzip files, why do we need to install/use
third party code to achieve the same functionality?"

I know that the above might be debatable, but these are the constraints I''m
facing....

Thanks,
MadMonk

"Jon Skeet [C# MVP]" wrote:

MadMonk< Ma ***** @ discussion.microsoft.comwrote:
MadMonk <Ma*****@discussions.microsoft.comwrote:

我需要编写一个小的Windows应用程序(控制台或表单)(对于Windows

XP SP2和Windows Server 2003),它将检查文件夹是否存在

一些文件,如果它们存在,它将使用内置的

压缩文件功能压缩文件(与上下文菜单相同 - 发送到

-Compressed(压缩) )文件夹)。


我不能使用任何其他第三方工具(如winzip等)因为一些

非技术限制。


但是,我还没弄清楚如何使用zip功能。

我需要调用zipfldr.dll吗? (在system32文件夹中)还是有另外一种

的方法吗?
I need to write a small Windows application (console or forms) (for Windows
XP SP2 & Windows Server 2003), which will check a folder for the presence of
some files, and if they exist, it will zip the files using the inbuilt
Compressed files functionality of Windows (same as the Context Menu -Send to
-Compressed (zipped) folder).

I cannot use any other third party tool (like winzip etc.) because of some
non-technical constraints.

However, I have not been able to figure out how use the zip functionality.
Do I need to call "zipfldr.dll" (in system32 folder) or is there another
way to do it?



您能准确告诉我们非技术限制是什么吗?

正常解决方案是使用CSharpZipLib,一个免费的托管zip API -

但不知道你的约束细节,我们不知道

是否可以选择。


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复该组,请不要给我发邮件


Could you tell us exactly what the non-technical constraints are? The
normal solution would be to use CSharpZipLib, a free managed zip API -
but without knowing the details of your constraints, we can''t know
whether or not that''s an option.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


" MadMonk" < ma ***** @ discussion.microsoft.com写信息

新闻:FC *********************** *********** @ microsof t.com ...
"MadMonk" <Ma*****@discussions.microsoft.comwrote in message
news:FC**********************************@microsof t.com...

我的客户不想要任何第三方应用程序/ dll /库

安装在(生产环境)服务器上,此应用程序将运行

My client doesn''t want any "third-party" applications/dlls/libraries
installed on the (production environment) server where this app would
run.



这是我的客户类型!我对此的正常回应是让我使用

第三方实用程序,我之前已经使用了100次,你可以在最后使用你的应用程序

这一周,否则它会花费额外的几个星期

可能更多的是我自己开发完全相同的东西。

That''s my type of client! My normal response to that is "Let me use the
3rd-party utility which I''ve used 100 times before and you can have your app
at the end of the week, otherwise it''ll take me an extra couple of weeks
possibly more to develop exactly the same thing myself."


这篇关于使用Windows中的压缩文件夹功能压缩文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆