C# - unip文件,最后没有.zip [英] C# - unsip file with out the .zip at the end

查看:67
本文介绍了C# - unip文件,最后没有.zip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码,一切都按照它的设想工作,但是如何在文件夹结尾处提取文件夹而没有提取文件夹?



this is my code, everything works as it suppose to but how do i have it extract the folder with out the folder.zip at the end of it?

private void Form1_Click(object sender, EventArgs e)
{


    OpenFileDialog ofd = new OpenFileDialog();
    if (ofd.ShowDialog() == DialogResult.OK)
    {
        ICSharpCode.SharpZipLib.Zip.FastZip fz = new FastZip();
        fz.ExtractZip(ofd.FileName, @"C:\Program Files\Windows Sidebar\Gadgets\" + ofd.SafeFileName, "");
        //System.IO.File.Move(ofd.FileName, @"C:\Program Files\Windows Sidebar\Gadgets\" + ofd.SafeFileName);
    }




}

推荐答案

最后摆脱了扩展


这篇关于C# - unip文件,最后没有.zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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