如何使用Visual Basic.NET搜索文件夹名称(例如'xerity') 和压缩文件夹(例如'zerxeritynar','hiun xerity natrer'等)?如何使用Visual Basic.NET搜索文件夹名称和zip文件夹?
0
A
回答
0
对于压缩,你可以使用从this location SharpZipLib。使用这个库来执行您的请求是非常容易的:
Dim sSourcePath As String
Dim sTextToFind As String
Dim sZipFileName As String
sSourcePath = "D:\Temp"
sTextToFind = "test"
sZipFileName = "D:\temp\zippedfiles.zip"
' Zip all of the found files
Dim oArchive As New FastZip
oArchive.RestoreDateTimeOnExtract = True
oArchive.CreateEmptyDirectories = False
' This uses the directory filter (last parameter) to only include the directories that match the string.
oArchive.CreateZip(sZipFileName, sSourcePath, False, "", "*" & sTextToFind & "*")
+0
谢谢。但在Visual Basic Express中使用时,SharpZipLib会提供20个错误。 – user1095332
+0
@ user1095332:您是在尝试构建sharpziplib库还是仅使用DLL?我强烈建议在你的情况下使用预编译的DLL。 –
相关问题
- 1. 如何搜索文件夹并复制visual basic.net中的文件夹?
- 2. 使用压缩文件的名称命名Zip文件夹
- 3. PHP搜索文件夹的名称
- 4. python从zip文件夹中获取文件夹名称列表
- 5. 搜索按文件的名称和打印内容文件夹
- 6. 如何使用preg_match搜索文件夹名称
- 7. 有文件和文件夹使用ZIP
- 8. 使用Visual Basic 2010的Zip文件夹
- 9. iPhone - 获取与zip名称相同的zip文件名和文件夹
- 10. MVC4使用文件夹和子文件夹名称路由
- 11. 如何使用Powershell搜索文件夹
- 12. 其文件夹和名称
- 13. ZIP文件夹
- 14. Py在文件夹和子文件夹中搜索文件
- 15. 文件夹名称文件夹里面
- 16. 如何用WinRAR创建一个ZIP文件名称为当前文件夹的名称的ZIP文件?
- 17. URL名称和文件夹
- 18. 从Eclipse文件搜索中排除文件夹名称
- 19. 搜索文件夹和文件
- 20. 搜索主文件夹和子文件夹中的.mp3文件
- 21. zip文件夹使用applescript
- 22. 排除搜索文件夹和文件
- 23. VBScript解压缩zip文件的文件夹名称
- 24. Python - 使用字符串列表来搜索文件夹名称
- 25. 根据文件和文件夹名称移动文件夹中的文件名
- 26. 如何在文件夹中按名称搜索图像?
- 27. 结合文件夹和zip文件
- 28. 批量搜索和替换文件夹名称
- 29. AG:搜索所有文件夹除了文件夹名称/子文件夹(Perl的正则表达式)
- 30. 名称/文件夹中带有空格的Zip文件
在代码中?或者在IDE的一部分?请具体说明您要完成的任务。 – David
它在代码中。 ... – user1095332
[Basic:如何搜索文件夹并复制visual basic.net中的文件夹?](http://stackoverflow.com/questions/8486312/basic-how-search-for-a-folder -and-copy-the-folder-in-visual-basic-net) – LarsTech