Substring is not "from", "to" but "from", "length".
Starting at index 47 and 83 characters long is way out of the range of your current string.
If you want the rest of the string anyway, use
string filename = file.Substring(idx);
That said, C# has nice APIs for doing this. Use the Path class whenever possible and don't do this manually.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…