Renaming dates under windows cmd

Posted by ldigas on Super User See other posts from Super User or by ldigas
Published on 2012-11-14T21:04:18Z Indexed on 2012/11/14 23:04 UTC
Read the original article Hit count: 250

Filed under:

I have a bunch of directories (folders, if you like) that follow this pattern

\20121022 Description of the directory's contents goes here\  

(some don't have it, just the date)

and I need to rename them to follow the following pattern

\2012-10-22 Description of the directory's contents ...\

Is there a way to do it using Windows cmd and the tools that come with it (namely, ren)? If not, what would be the most portable way to do it? I have a very restricted set of privileges on the machine I'm doing this on.

© Super User or respective owner

Related posts about command-line