Jump to content

Recommended Posts


Posted

Thank you very much for removing the content of your post, it really does help to make this forum more user unfriendly!

To my knowledge Scripting Guy tends to concentrate on VBScripting therefore your question was unlikely answered by him and due to your untimely self-editing by us neither.

Please do not hesitate to keep us uninformed in future! :realmad:

  • 4 weeks later...
Posted

Sorry about that, I just thought since i found it right after i posted, i should delete the topic and not waste everyones time. And since i said that i found the answer at the script guy a search should of put anyone on the right track.

But anyway. next time i won't delete a post but add on to it and provide complete links

I found this site:

http://www.microsoft.com/technet/scriptcen...08/hey0626.mspx

The script guy talks about being able to copy multiple items using a criteria.

I still have not done this, I haven't had much time lately but what i found relevent was this part:

objRegEx.Pattern = "^FS|^CG|^GPS."

What we’re doing here is defining the criteria for our regular expression search. In this case, we’re looking for one of three possible matches. How do we know that there are three possible matches? Because of the pipe character (|), which serves the same function as the word or; in this Pattern we’re looking for ^FS or we’re looking for ^CG or we’re looking for ^GPS. See how that works?

"

That’s nice, but what exactly are we searching for (i.e., what does the syntax ^FS actually mean)? Well, in regular expressions the caret symbol (^) means “at the beginning of the string.” (Actually, the caret symbol has another meaning besides that, but we’ll ignore that other meaning for now.) As it turns out, this syntax is remarkably easy to decipher: we’re simply looking for the letters FS at the beginning of the string. And if we don’t find those two letters we’ll check to see if the letters CG or GPS can be found at the beginning of the string instead. If any of those things are true, then we have ourselves a match."

Hope this is cool :)

Posted

That of course is VBScripting as opposed to the Batch file example requested in your Topic Title.

Regardless of that fact and the fact that neither language are particularly good at regular expressions, if you could post an example explaining what it is you want we may be able to provide a better/alternative for you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...