Write a script to create the following directory structure i

Write a script to create the following directory structure in a directory of user’s choice. The user can supply this input as an argument; if not, prompt the user to enter one from the command line.

(User selected existing directory) Data Image Cache

Solution

@echo off

if [%1]==[] (
goto NoARG ) else ( goto Arg )

:NoArg
set /p folderName= \"What Directory would you like?\"
goto CreateFolder

:Arg
set folderName = %1
goto CreateFolder

:CreateFolder
echo %folderName%
IF NOT EXIST \"%folderName%\\Data\" (md \"%folderName%\\Data\" )
IF NOT EXIST \"%folderName%\\Data\\Image\" md \"%folderName%\\Data\\Image\"
IF NOT EXIST \"%folderName%\\Data\\Cache\" md \"%folderName%\\Data\\Cache\"

Write a script to create the following directory structure in a directory of user’s choice. The user can supply this input as an argument; if not, prompt the us

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site