Showing tag results for string manipulation

Jun 19, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Use a File Mask When Renaming Files?

ScriptingGuy1

Hey, Scripting Guy! How can I change file names using a file mask? You know, like when you run the command-line command ren ??x???p?.* ?a????bc.x??.-- AM Hey, AM. Well, the big news out of Seattle is that the Mariners have fired their general manager, Bill Bavasi; that’s to be expected when you spend $117 million on salaries and the team yo...

Scripting Guy!scripting techniquesVBScript
May 21, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Compare Two Strings Values and Then Report Back the Result of That Comparison?

ScriptingGuy1

Hey, Scripting Guy! I need to write a command-line script that, given two arguments, can compare the two values and then – using standard errorlevel – report back whether string 1 is greater than or less than string 2, or if the two strings are identical. Can you help me with that?-- JP Hey, JP. You know, in the past few days the sports world ha...

Scripting Guy!scripting techniquesVBScript
Apr 3, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Separate The Month From the Year in a Date String Like 122007?

ScriptingGuy1

Hey, Scripting Guy! I have a column of data in Microsoft Excel that is formatted as MYYYY (12008 = January 2008) and MMYYYY (122007 = December 2007). I need to split these values into month and year, but I can’t figure out how to do that. Any suggestions?-- DW Hey, DW. Well, it’s finally beginning to warm up here in Scripting Land, assuming you ...

Scripting Guy!scripting techniquesVBScript
Feb 18, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Extract Three-Digit Numbers From a String?

ScriptingGuy1

Hey, Scripting Guy! I’m trying to use regular expressions to extract three-digit numbers that are enclosed by pipe characters; they embedded in string values like this: |159|468|572|843|. However, I can’t figure out the syntax that will get this to work. Can you help me?-- RS Hey, RS. Before we answer this question we should note that...

Scripting Guy!scripting techniquesVBScript
Dec 11, 2007
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Replace Text That Includes Double Quote Marks and a Tab Character?

ScriptingGuy1

Hey, Scripting Guy! I read one of your columns on replacing text in a file and I found it very useful. However, I have a somewhat more-complicated need: I want to replace text that includes both double quote marks and a tab character. How can I do that?-- FC Hey, FC. Your know, as anyone who’s ever read Hey, Scripting Guy! could tell you, the Sc...

Scripting Guy!scripting techniquesVBScript