提取文件名

扫码查看
本文介绍了提取文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我使用openfiledialog让用户选择文件,然后我使用filenames()提取文件
。我现在如何将文件路径

与实际文件名分开?


谢谢


问候

Hi

I am using openfiledialog to get user to select files and then I am
extracting the files using filenames(). How can I now separate the file path
from the actual filename?

Thanks

Regards

推荐答案




查看''System.IO.Path.GetFileName''。


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< ; http://www.mvps.org/dotnet>



Have a look at ''System.IO.Path.GetFileName''.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>






您确定每个平台都使用\作为路径分隔符?


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>



Are you sure every platform uses "\" as path separator?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


这篇关于提取文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 18:13
查看更多