-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwblGen.bat
30 lines (26 loc) · 892 Bytes
/
wblGen.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
27
28
29
30
@echo off
REM wblGen.bat - v 1.0.0 - 2015-10-09
REM Description:
REM A simple batch file that automatically generates the wblfolder.wbl for your Qlik Sense visualization extension.
REM
REM Author: Nate Untiedt - Analytics8 - [email protected]
REM
REM Credit to: http://stackoverflow.com/a/8387078
setlocal EnableDelayedExpansion
for /L %%n in (1 1 500) do if "!__cd__:~%%n,1!" neq "" set /a "len=%%n+5"
setlocal DisableDelayedExpansion
echo Deleteing wbfolder.wbl...
del .\src\wbfolder.wbl
echo Generating wbfolder.wbl...
REM Iterate through entire directory recursively
for /r .\src %%g in (*) do (
set "absPath=%%g"
echo absPath: %%g
setlocal EnableDelayedExpansion
REM Trim off the absolute portion of the path
set "relPath=!absPath:~%len%!"
REM Write each entry to wbfolder.wbl
echo(!relPath!; >> .\src\wbfolder.wbl
endlocal
)
Echo Wbfolder.wbl generation completed