首页->【软件工具包使用(SW/Software Tools Usage)】

4 1

Option Explicit
Public Function batchReadFiles()
    
    Dim strFileName As String
    Dim strPath As String
    Dim strTmpVar As String
     
    strPath = "F:\DesktopSHi\FFT\"
    strFileName = Dir(strPath & "*.v")
    
    While strFileName <> ""
        
        Open strPath & strFileName For Input As #1
        Do While Not EOF(1)
             Line Input #1, strTmpVar
        Loop
        Close #1
        Debug.Print "The file is " & strFileName
        strFileName = Dir
        
    Wend
End Function

调试结果如图

图片.png

实际目录下的文件如下图所示:

图片.png

楼主可见

  1. shwnyoo 1#

    ***此内容已隐藏,只有楼主可见***