user1100756
user1100756

Reputation: 66

Batch file to move folders to sub-folders

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

Upvotes: 0

Views: 1492

Answers (1)

rojo
rojo

Reputation: 24486

cd \invoices
for /d %%I in (*) do (
    md "%%I\2013"
    move "%%I\January" "%%I\2013"
)

Upvotes: 4

Related Questions