Im trying to teach myself vb.net, and the way Im doing this is that anytime I need to do something on my computer and it's not part of windows or some big software package thats out there, I figured I would write a tool to do it.
So i had to renam a whole directory worth of files the other day (actually just prefixing a string to the existing file name, which I was able to do.) Even though that's all I needed it for at the moment, Im trying to expand my learning and make this thing able to change the extension of a file.
This is where im having n00b brain. I know i can't rely on lopping off the last three characters because what if a file has a 4 char extension? I think what I need to do is move over from the right char by char until I encounter the first period, then I can axe everything to the right of it.
Im not looking for the code to do this, id like to do that for myself, but rather what method will be the most effective and flexible?
Thanks for your time.
So i had to renam a whole directory worth of files the other day (actually just prefixing a string to the existing file name, which I was able to do.) Even though that's all I needed it for at the moment, Im trying to expand my learning and make this thing able to change the extension of a file.
This is where im having n00b brain. I know i can't rely on lopping off the last three characters because what if a file has a 4 char extension? I think what I need to do is move over from the right char by char until I encounter the first period, then I can axe everything to the right of it.
Im not looking for the code to do this, id like to do that for myself, but rather what method will be the most effective and flexible?
Thanks for your time.