forked from SAP-samples/hana-xsa-opensap-hana7
-
Notifications
You must be signed in to change notification settings - Fork 4
/
xs_users.bat
26 lines (26 loc) · 856 Bytes
/
xs_users.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
if "%2"=="" (
echo.
echo usage: %~nx0 [starting number] [ending number] [pad] [User Name Base]
echo example: %~nx0 1 140 3 DEV160_ will output DEV160_001 to DEV160_140
echo.
goto end
)
rem .
setlocal enabledelayedexpansion
if "%3"=="" (
for /l %%x in (%1, 1, %2) do (
echo.%%x
)
) else (
set "mynum="
for /l %%x in (%1, 1, %2) do (
call set "mynum=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000%%x"
call set "mynum=%%mynum:~-%3%%"
call set "var=xs set-space-role %4%%mynum%% HANAExpress development SpaceDeveloper"
REM echo "!var!"
REM call echo %4%%mynum%%
call !var!
)
)
:end