从全路径名中提取文件名 Function StripPath(T$) As String Dim x%, ct% StripPath$ = T$ x% = InStr(T$, "\") Do While x% ct% = x% x% = InStr(ct% + 1, T$, "\") Loop If ct% > 0 Then StripPath$ = Mid$(T$, ct% + 1) End Function 例子: File = StripPath("c:\windows\hello.txt"