返回列表 上一主題 發帖

[發問] 判斷檔案存在否? 結果為"False不存在" 的檔案輸出文字檔案

本帖最後由 webbliu 於 2011-8-29 11:30 編輯

回復 10# elinbit


    Dear 大大  
我已經解決,感謝你的指導&建議
非常謝謝
我的解法如下~
  1. Dim sizefile As System.IO.FileInfo
  2. Dim apath As Sting
  3. Dim N As Integer
  4. Dim size =system.IO.Fileinfo

  5. For i =1 to N

  6. sizefile = My.Computer.FileSystem.GetFileInfo(apath)
  7.             On Error Resume Next
  8.             If sizefile.Length < 0 Then
  9.                 file.WriteLine("miss"+ ": " + apath)
  10.                 End If
  11.                 'Else

  12. ProgressBar1.Value = Int(i / n * 100)
  13. ProgressBar1.Refresh()

  14. Next
複製代碼

TOP

        靜思自在 : 一個人的快樂.不是因為他擁有得多,而是因為他計較得少。
返回列表 上一主題