VB: Keep only the filename without the path.

Solved
Anonyme209 Posted messages 761 Status Membre -  
Anonyme209 Posted messages 761 Status Membre -
Hello,

I am looking, in Visual Basic 2010, to retrieve only the file name from a file path. I thought about removing everything before the last "\\" but I don't know how to do that.

Thank you for your help.

2 réponses

Patrice33740 Posted messages 8400 Registration date   Status Membre Last intervention   1 781
 
Hello,

try:
 NomCourtFichier = CreateObject("Scripting.FileSystemObject").GetFileName(nomCompletFichier)


--
Best regards
Patrice
6
Anonyme209 Posted messages 761 Status Membre 19
 
Thank you very much, that works.
I'm closing the topic.
0