Title: Batch file to move folders to sub-folders
Tags: windows;file;batch-file;directory;move
Question: Here is my current folder structure:
C:\Invoices\**CustomerName**\January
I'm looking for a script that will go through ALL the CustomerNames and move the January folder to
C:\Invoices\**CustomerName**\2013\January
Thanks
Comment: Try it yourself, follow this link and use the commands. It is much more satisfying to manage it yourself ;-) http://academic.evergreen.edu/projects/biophysics/technotes/program/batch.htm


Here is another answer: cd \invoices
for /d %%I in (*) do (
md "%%I\2013"
move "%%I\January" "%%I\2013"

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:01/29/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<windows><file><batch-file><directory><move>', 'Title': 'Batch file to move folders to sub-folders', 'ViewCount': 1474, 'id': 14589784, 'user_AboutMe': None, 'user_AccountId': 1110125.0, 'user_DisplayName': 'user1100756', 'user_Reputation': 64.0, 'user_Views': 8.0, 'user_id': 1100756.0}}