Link to home
Start Free TrialLog in
Avatar of rdgfilings
rdgfilingsFlag for United States of America

asked on

Batch rename folders

There are over 300 sub-folders in one folder all have the same name formatting:
xxxx-xxxxxxx.yyyy.xxxx
,where "x"s are various number of characters, "yyyy" is year number (2012 for example). I want rename them to:
xxxxxxx.yyyy (remove anything before and including "-", and remove anything after year).

Is there a fast way to do it?
SOLUTION
Avatar of IT_Crowd
IT_Crowd
Flag of Heard Island and McDonald Islands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are these folder names always the same length?
If they are, we could use the MID command in VBS   :)

http://www.w3schools.com/vbscript/func_mid.asp
Avatar of rdgfilings

ASKER

thanks, IT_Crowd. I will test the codes. The folder names are different in length (i.e. the number of "x"s is uncertain, the only certain number is "yyyy" - always 4)
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial