Osley
asked on
Batch folder creation?
I need to modify a DOS script, so that it:
1. creates one folder called 'documents' and within this folder, 3 more folders, where there's 400 folders that this needs to be applied to
2. count of how many folders the function was applied to
3. create a log file confirming success/ failure
I was previously provided the following script under the address:
https://www.experts-exchange.com/questions/28006593/Batch-folder-creation.html
How do I modify this, to achieve the above?
@echo off
setlocal
set BaseDir=H:\Temp Folder\2013
set NewDirs="Excel","Powerpoin t","Word"
(
echo Making Directories...
for /D %%A in ("%BaseDir%\*.*") do (
for %%B in (%NewDirs%) do (
md "%%~A\%%~B" >NUL 2>&1 && (
echo Created: "%%~A\%%~B"
) || (
echo *ERROR*: "%%~A\%%~B"
)
)
)
)>"log.txt"
1. creates one folder called 'documents' and within this folder, 3 more folders, where there's 400 folders that this needs to be applied to
2. count of how many folders the function was applied to
3. create a log file confirming success/ failure
I was previously provided the following script under the address:
https://www.experts-exchange.com/questions/28006593/Batch-folder-creation.html
How do I modify this, to achieve the above?
@echo off
setlocal
set BaseDir=H:\Temp Folder\2013
set NewDirs="Excel","Powerpoin
(
echo Making Directories...
for /D %%A in ("%BaseDir%\*.*") do (
for %%B in (%NewDirs%) do (
md "%%~A\%%~B" >NUL 2>&1 && (
echo Created: "%%~A\%%~B"
) || (
echo *ERROR*: "%%~A\%%~B"
)
)
)
)>"log.txt"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Happy to help, thanks for the feedback.
~bp
~bp
ASKER
Once again - much appreciated.