Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用Winrar以平面结构压缩归档文件_C#_Process_.net 4.0_Winrar - Fatal编程技术网

C# 使用Winrar以平面结构压缩归档文件

C# 使用Winrar以平面结构压缩归档文件,c#,process,.net-4.0,winrar,C#,Process,.net 4.0,Winrar,我在不同的文件夹中有一堆档案,我想将所有文件压缩成.zip格式: 我正在尝试的是: 怎么了? Zip包含所有文件夹(路径),而不仅仅是文件ToCompress 编辑: 类似于DotNetZip参数: -flat - store the files in a flat dir structure; do not use the directory paths from the source files. 尝试添加-ep 从

我在不同的文件夹中有一堆档案,我想将所有文件压缩成.zip格式:

我正在尝试的是: 怎么了? Zip包含所有文件夹
(路径)
,而不仅仅是文件
ToCompress


编辑: 类似于
DotNetZip
参数:

  -flat             - store the files in a flat dir structure; do not use the
                      directory paths from the source files.

尝试添加
-ep

从Rar.exe帮助中:

ep            Exclude paths from names
ep1           Exclude base directory from names
ep2           Expand paths to full
ep3           Expand paths to full including the drive letter
ep            Exclude paths from names
ep1           Exclude base directory from names
ep2           Expand paths to full
ep3           Expand paths to full including the drive letter