C# 控制Winrar软件 实现压缩文件夹及文件,还可以解压缩*.rar文件
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
using Microsoft.Win32;
namespace HdsxAirCtSoft.ClsComm
{
class ClsRar
{
public static string SysrarPath = Application.StartupPath + @"\SysCopylog\"; public string WinRarPath = Application.StartupPath + @"\";
/// <summary>
/// 利用 RAR 进行压缩
/// </summary>
/// <param name="path">将要被压缩的文件夹(绝对路径)</param>
/// <param name="rarPath">压缩后的 .rar 的存放目录(绝对路径)</param> /// <param name="RarFileName">压缩文件的名称(包括后缀)</param> /// <returns>true 或 false。压缩成功返回 true,反之,false。</returns> public Boolean DosRarFile(string path, string rarPath,string RarFileName) {
if (System.IO.Directory.Exists(rarPath)==false)
{
System.IO.Directory.CreateDirectory(rarPath);
}
if (path.IndexOf(" ") > 0)
{ path = "\"" + path + "\""; }
string myrarPathfile = "";//压缩后的文件路径
if (rarPath.IndexOf(" ") > 0)
{
myrarPathfile = "\"" + rarPath + RarFileName + "\"";
}
else
{
myrarPathfile = rarPath + RarFileName;
}
string SysRarPath = "";
string SysRarFilePath = "";
if (WinRarPath.IndexOf(" ") > 0)
{
SysRarPath = "\"" + WinRarPath + "\"";//WinRar 所在的路径
SysRarFilePath = "\"" + WinRarPath + "HdsxCpy.exe" + "\"";
}
C#控制Winrar压缩软件压缩... 6页 2财富值 C#在线压缩与解压 6页 免费 C#设计...@"C:Test?70821.txt"; // 文件压缩 the_Info = " a " + rarName + ...
怎样使用 WinRAR 压缩软件 WinRAR 是目前网上非常流行和通用的压缩软件,全面支持...使用 WinRAR 快速压缩和解压 WinRAR 支持在右键菜单中快速压缩和解压文件操作十分...
c:\temp(支持批 量操作) 2、将 temp.rar 解压到 c:\temp 目录,并且解压...压缩目录 test 及其子目录的文件内容 Wzzip test.zip test -r -P WINRAR A ...
压缩软件WinRAR 问题: 小明最近从网上下载了一些文件,下载后都 变成了如下图标: 这是些什么格式的文件?有什么作用?这些文件就是我们说的压缩文件,它们是RAR和ZIP...
(支持批量操作) 2、将temp.rar解压到c:\temp目录,并且解压后的目录结构和temp...压缩目录test及其子目录的文件内容 Wzzip test.zip test -r -P WINRAR A ...
WinRAR解压缩软件使用方法_电脑基础知识_IT/计算机_专业资料。Gugediqiu.org 用户...开关被用来 改变 RAR 执行操作的方法。其它参数是压缩文件名和被压缩的文件或要...
使用技巧问答 Winrar是什么 Winrar是WinRAR 是 32 位 Windows 版 本的 RAR 压缩文件管理器 - 一个允许你 创建、管理和控制压缩文件的强大的压 缩和解压工具。 ...
压缩与解压缩工具WinRAR的使用_理学_高等教育_教育专区。hao今日推荐 50...第2章 文件压缩工具 54页 免费 WinRAR使用图解教程 33页 免费 课件_压缩工具winrar...
需要说明的是,WinRAR内置的压缩文件修复功能并非对于...码”,它采用多项式编码方法,是一种高效的差错控制...现象二:刚下载的一个软件压缩包,使用WinRAR解压时...
WinRAR 压缩软件应用大全只要你使用电脑,就一定会接触到压缩文件!如果从专业角度来说,压缩实际就是一种 程序算法,通过这种算法,可以将一个大的文件像压缩饼干一样...
热门文档