hi all - i am new here, but have spent about 90 mins reading here and about regex first
so... i screwed up a large bunch (tens of thousands) of folder names
i had wanted to get a count of the total number of folders and sub-folders on a data drive, and was looking for software that would do that for me - unfortunately i found this software: http://www.brothersoft.com/folder-counter-217085.html
but instead of counting all the folders and subfolders and then just giving me the total (yes, i ran it before finding more about it - really dumb, i know), instead it counted the number of files in all of the folders and sub-folders, and then appended that number onto the end of each folder and sub-folder's name, in parentheses, in the form: "folder name (xyz)"
so, i found bru and read some of the forums for a regex which might clean this mess up (there is no "undo" function for this "folder counter" program, which apparently is discontinued and for which there is no forum) - i downloaded the recommended regex coach and started the recommended tutorials at http://www.regular-expressions.info/ - but was hoping that perhaps stefan or GMA or someone here might be able to guide me a bit and speed up my learning curve
what i think i need is a regex that will go to the end end of each folder (but not of each file), and if an end paren ")" exists (only at the very end - ie., nothing to the right of it) which is also preceded by an integer (i have legitimate folder names with parens at the end preceded by an alpha character but no unwanted "folder counted" number in parens at the end), then to delete that end paren and each preceding integer (up to 4 - no folder has more than 9999 files) until a start paren is found and also deleted
so every (x) or (xy) or (xyz) or (xyza), where xyz and a are integers, found only at the very end (nothing to right of end paren) of each folder name (but not file name) should be deleted.
Any help or hints on this for me to try would be very much appreciated
in the meantime i will learn as much as i can about regex on my own in the time i have to do so
thanks much
steve