本文介绍了比较两个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
—SA
You can use System.IO.Directory.GetFiles, please see:
msdn.microsoft/en-us/library/system.io.directory.aspx[^].
For working with ZIP, you can use #ziplib:
www.icsharpcode/opensource/sharpziplib/[^].
Another option is using SevenZipSharp, a .NET wrapper of the famous 7-Zip:
en.wikipedia/wiki/7-Zip[^],
sevenzipsharp.codeplex/[^].
Both ZIP libraries are open-source.
—SA
你好, 我已经设置了一个按钮以及所有内容,我只需要知道如何为它设置代码即可在两个文件夹之间进行检查即可. 当我只单击按钮时,它将访问文件夹而不显示和比较它们. 完成后,我需要在Folder2中删除在Folder1中找不到的文件,但是在删除它们之前,我需要它保存每个文件名,然后再删除,以便可以从ZIP 2中删除它.
Hello, I have already setted up a button and everything, i just need to know how to setup a code for it to check between two folders.. that when i just click the button, it will access the folders without showing and compare them. when its done, i need the files that werent found in Folder1 to be deleted in Folder2, but before deleting them I need it to save every files name before it deletes so it can be deleted from a ZIP two.
推荐答案您可以使用 System.IO.Directory.GetFiles,请参阅: msdn.microsoft/en-us/library/system.io. directory.aspx [^ ]. 要使用ZIP,您可以使用#ziplib: www.icsharpcode/opensource/sharpziplib/ [ ^ ]. 另一个选择是使用SevenZipSharp,它是著名的7-Zip的.NET包装: en.wikipedia/wiki/7-Zip [ ^ ], sevenzipsharp.codeplex/ [ ^ ]. 这两个ZIP库都是开源的.
更多推荐
比较两个文件夹
发布评论