Discussion:
Copying Folder Structure (subfoder) to Folders
(too old to reply)
Andre Gobet
2009-12-31 17:44:31 UTC
Permalink
Hello

We're using an Windows Server 2003 Standard in our Office. There we've
got a Folder Structure, like a Folder per customer. Example:

Customer A
Customer B
Customer C
Customer D

Now i'd like to create general subfolders in these (Parent) Folders,
like:

VAM
LPP
Caisse
Test
Report

Is there an easy way to create a script or to use an existing program
on the market that can do what i want.

Thank's in advance.

- André
Pegasus [MVP]
2009-12-31 17:56:45 UTC
Permalink
Post by Andre Gobet
Hello
We're using an Windows Server 2003 Standard in our Office. There we've
Customer A
Customer B
Customer C
Customer D
Now i'd like to create general subfolders in these (Parent) Folders,
VAM
LPP
Caisse
Test
Report
Is there an easy way to create a script or to use an existing program
on the market that can do what i want.
Thank's in advance.
- André
You can do it with these two console commands. They assume that the various
customer folders reside in d:\Customers.

Command 1:
cd /d d:\customers

Command 2:
for /d %a in (*.*) do for %b in (VAM LPP Caisse Test Report) do md "%a\%b"

To avoid typing errors, a little batch file would be a better solution:
@echo off
cd /d d:\customers
for /d %%a in (*.*) do for %%b in (VAM LPP Caisse Test Report) do md
"%%a\%%b"

Loading...