VB_读取rar文件代码

 思路是先解压出来,目录可以自己指定,如果谁有更好的思路欢迎提供~~~~~~~3Q~~~~~
  1. Dim AP$
  2. Public Sub GETPIC()
  3. Dim a$
  4. If Dir(AP & "CG_StillNPC_ID_Picture") = "" Then Exit Sub
  5. If Dir(AP & "临时储存区~", vbDirectory) = "" Then
  6.  MkDir AP & "临时储存区~"
  7.  Shell "C:/Program Files/WinRAR/WinRAR.exe   x   -psncom   " & AP & "CG_StillNPC_ID_Picture" & "   " & AP & "临时储存区~", vbHide
  8. End If
  9. End Sub
  10. Private Sub Form_Load()
  11. AP = IIf(Right(App.Path, 1) = "/", App.Path, App.Path & "/")
  12. End Sub
  13. Private Sub Form_Unload(Cancel As Integer)
  14. If Dir(AP & "临时储存区~", vbDirectory) <> "" Then
  15.  Dim fso As New FileSystemObject
  16.  fso.DeleteFile AP & "临时储存区~/*.*"True
  17.  RmDir AP & "临时储存区~"
  18. End If
  19. End Sub

你可能感兴趣的:(VB_读取rar文件代码)