Re: Parsing a Filename Help
Yes you can use Split() of course in your sample you are using a dash rather than an underscore so that would not work
If you just want to removed the underscores you can use the Replace() method to replace them with an empty string as well.
Re: Parsing a Filename Help
I tried using :
Code:
File = Split(File.Name,"_")
secondvalue = File(1)
firstvalue = File(2)
In my for each loop and it doesn't recognize File.Name, I am sure I am doing this incorrectly.
Re: Parsing a Filename Help
You are trying to use file for 2 different things in the same section of code. You can't do that
Since File is the object you are using for your for each loop you need another var to hold the string you are splitting from it.
I assume that the file object there would have a .Name property but honestly I do not write VB Script and this really is not the correct place for scripting questions.
Also note that you should not use the word File as a variable name