How do I get just filename (without path and extension) like \"MyFileName\" from the following full path? C:\\A_B\\C.D\\E_\\F0123456789\\G\\MyFileName.txt
If it's a real file that you have access to, you can use Dir
sFileOnly = Dir(sPathAndFile)
If it's not a real file or you don't have access to it, this will return an empty string.