从压缩文件夹中复制文件 [英] Copy a file from zipped folder

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

问题描述

亲爱的所有人,



我想从压缩文件夹复制文件并放入目标文件夹。我正在使用VS2012 .net framework 4.5。我看过DotnetZip,但它对我没有帮助。我的代码如下。它适用于解压缩文件夹但不适用于压缩文件夹。我怎样才能做到这一点。请帮我。这非常紧急。在此先感谢



public static void Main(string [] args)

{

File.Copy( C:\\C#CodeExample \\TDPOC \\ABC.zip \\AUDIT.LOG,C:\\ C#CodeExample \\ TDPOC \\NewLogFile \\ MyNewLogFile.LOG);



}

Dear All,

I want to copy a file from zipped folder and put in a destination folder. I am using VS2012 .net framework 4.5. I have looked at DotnetZip but it doesn't help me. my code is below. It is working for unzip folder but not working for zipped folder. how can I do that. please help me. It's very urgent. Thanks in Advance

public static void Main(string[] args)
{
File.Copy("C:\\C#CodeExample\\TDPOC\\ABC.zip\\AUDIT.LOG, C:\\C#CodeExample\\TDPOC\\NewLogFile\\MyNewLogFile.LOG);

}

推荐答案

您所显示的代码行post完全没有意义,这部分:ABC.zip \\AUDIT.LOG。谁告诉你路径可以继续进入zip文件?阅读DotNetZip文档并按预期方式使用产品,而不是幻想告诉您的方式:

http:// dotnetzip .codeplex.com / documentation [ ^ ]。



-SA
The line of code shown in your post makes no sense at all, this part: "ABC.zip\\AUDIT.LOG". Who told you that a path can go continue into the zip file? Read DotNetZip documentation and use the product the intended way, not the way your fantasy tells you:
http://dotnetzip.codeplex.com/documentation[^].

—SA


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

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