Batch file issue in Creating Folders in Win7

May 22, 2011 at 20:30:05
Specs: Windows 7, Intel core 2 duo
Hi, I am having an issue in creating a folder for user2. My code is given below:

@echo off
cls
net user user1 /add
net user user2 /add
set /p UserName = Enter your username...
shift
if %UserName% == "user1" goto mkt
if %UserName% == "user2" goto fin
:mkt
md C:\Users\user1\Marketing
pause
net share Marketing_folder = C:\Users\user1\Marketing /remark:"Marketing for User1"
pause
net use /user:user1
pause
@echo on
exit
:fin
md C:\Users\user2\Finance
pause
net share Finance_folder = C:\Users\user2\Finance /remark:"Finance for User2"
pause
net use /user:user2
pause
@echo on
exit

I can create users and creater marketing for user1 but I cant create finance for user2. Please Help!!!

Cheers!!!


See More: Batch file issue in Creating Folders in Win7

Report •

#1
May 22, 2011 at 22:51:11
This should be in the programming forum here: http://www.computing.net/forum/prog...

Report •
Related Solutions


Ask Question