Last post Oct 14, 2018 10:41 PM by PaulTheSmith
Oct 14, 2018 05:18 PM|ManderinViolin12|LINK
Greetings - we are using a web portal to have users submit a word document (either .doc or .docx extension) that part of the filename is S11B01.doc - it always ends like this - student number, and block number. It's always 2 digits student number and always
2 digit block number. How can I parse the file name and store in two variables studentID = 11 and blockID = 01?
Oct 14, 2018 10:41 PM|PaulTheSmith|LINK
var justName = Path.GetFileNameWithoutExtension(theFileName);
var studentID = justName.Substring(1,2);
var blockID = justName.Substring(4,2);