logo
  • 教程列表
  • SO官方文檔
  • Scripting.FileSystemObject 的
    • 僅檢索檔案路徑中的路徑
    • 僅從檔名中檢索副檔名
    • 遞迴列舉資料夾和檔案
    • 從檔名中剝離副檔名
    • 建立 FileSystemObject
    • 使用 FileSystemObject 讀取文字檔案
    • 使用 FileSystemObject 建立文字檔案
    • 使用 FileSystemObject 列舉目錄中的檔案
    • 使用 FileSystemObject 寫入現有檔案
    • 使用 FSO.BuildPath 從資料夾路徑和檔名構建完整路徑
  1. StackOverflow 文件
  2. VBA 教程
  3. Scripting.FileSystemObject 的
  4. 從檔名中剝離副檔名

從檔名中剝離副檔名

Created: November-22, 2018

Dim fso As New Scripting.FileSystemObject
Debug.Print fso.GetBaseName("MyFile.something.txt")

列印 MyFile.something

請注意,GetBaseName() 方法已經處理了檔名中的多個句點。

  • 建立 FileSystemObject
  • 遞迴列舉資料夾和檔案

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明