G
Guest
Hi;
My goal is to remove the file name, minus the extension, from the following
string =
\\aServer\dir1\dir2\dir3\myfile.txt.
I tried all sorts of combinations of Instr() , revInstr() ex.
Dim hold as String = "\\aServer\dir1\dir2\dir3\myfile.txt."
Mid(hold, InstrRev("myFile.txt", "\"), Instr(1, "myFile.txt","." ))
This gets you close but is still a couple of characters off.
I even tried to hold.indexOf("\") and hold.LastindexOf("\") with and without
adding an offset of 1 and even these methods yielded a result that was a
couple of characters off.
SO what am I doing wrong ?
Thanks
My goal is to remove the file name, minus the extension, from the following
string =
\\aServer\dir1\dir2\dir3\myfile.txt.
I tried all sorts of combinations of Instr() , revInstr() ex.
Dim hold as String = "\\aServer\dir1\dir2\dir3\myfile.txt."
Mid(hold, InstrRev("myFile.txt", "\"), Instr(1, "myFile.txt","." ))
This gets you close but is still a couple of characters off.
I even tried to hold.indexOf("\") and hold.LastindexOf("\") with and without
adding an offset of 1 and even these methods yielded a result that was a
couple of characters off.
SO what am I doing wrong ?
Thanks