Avatar of rdgfilings
rdgfilings
Flag 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?
Windows 7

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
SOLUTION
IT_Crowd

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
IT_Crowd

You can use this to remove the "-"
http://www.w3schools.com/vbscript/func_replace.asp
IT_Crowd

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
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)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Qlemo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question