For purposes of learning to write a script I have a folder called -
abc v.1.2I want
abc v1.2The idea being that I keep a "." following a numeral, stripping any others. A simple regex transposition I thought....
((?:[a-zA-Z]+)+)\.
-to-
\1<space>
I have made a couple of assumptions:-
- I need to get the selected folder name;
- I assign it a variable;
- I then pass that variable to my command string.
Guessing this is something like
$s = StrRegExpFind( $s, "v." , "v", ".?\d");
As I don't know PHP & I don't have examples of regex type formulae for MCS (I tried transposing elements of Jungles script but it's too advanced for me at this point) I have been messing for several hours unsuccessfully with various combinations & assignments & getting nowhere.
I began trying a simple rename - 1.2.3.4 to 1234 & failed.
I managed to grab the name-
@var $arr = GetSourceSelectedFileNames();
It comes up as an array correctly, then I assumed I would hand the $arr to the rename function (even tho it's technically a string)
RenameFile( $arr = StrReplace( $arr, "." , "" ) );
The debugger runs but doesn't red-flag anything (BTW is there a list of error codes somewhere?)
& of course nothing happens.....
So I think I need a walkthru or something that helps me define what I need to do in terms of framework & assignments.
I assume Jungle wasn't born fluent in MCS,
so how do I get started with this? TiA