以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]求文件名不含扩展名 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=100324) |
-- 作者:hiliuyong -- 发布时间:2017/5/9 15:45:00 -- [求助]求文件名不含扩展名 Out put.Show(FileSys.GetName("C:\\reports\\test.xls")) 输出为: test.xls 如果不要扩展名,只要得到test,如何写呢? |
-- 作者:有点色 -- 发布时间:2017/5/9 15:47:00 -- Dim str As String = FileSys.GetName("C:\\reports\\test.xls") Dim idx = str.LastIndexOf(".") If idx >= 0 Then str = str.SubString(0, idx) End If msgbox(str) |
-- 作者:hiliuyong -- 发布时间:2017/5/9 15:48:00 -- 谢谢 |