Visual Basic > Files Directories Drives
Get only the filename
Get only the filename 'use as MsgBox HaalBestandNaam("c:\windows\win.com","\") 'gives you 'win.com' MsgBox HaalBestandNaam("d:/data/backup.txt","/") 'gives you 'backup.txt' 'last example I needed for conencting to some unix-systems Function HaalBestandNaam(bron$, vSlash$) as String dim p% HaalBestandNaam = bron For p% = Len(bron$) To 0 step -1 If Mid$(bron$, p%, 1) = vSlash$ Then HaalBestandNaam = Mid$(bron$, p% + 1, Len(bron$) - p% + 1) exit Function end If Next p% End Function
Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows