Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6999 leency 1
@echo off
2
set TXTFILE=file_listing.h
3
set DIRPATH="KingsBounty/*"
4
set DIRNAME=KingsBounty
5
set INDEX=0
6
 
7
::Create TXTFILE
8
echo //FIle listing generated by BAT script > "%TXTFILE%"
9
 
10
::List files in DIRPATH and call function to write
11
::files into TXTFILE
12
FOR %%i IN (%DIRPATH%) DO Call :Function_Write %%i
13
 
14
echo %TXTFILE% created from files in directory %DIRPATH%
15
GoTo :EOF
16
 
17
:Function_Write
18
echo #define FILE_NAME_%INDEX% "%DIRNAME%/%1\0" >> "%TXTFILE%"
19
echo dword file%INDEX% = FROM FILE_NAME_%INDEX%;  >> "%TXTFILE%"
20
 
21
if %INDEX%==10 set INDEX=11
22
if %INDEX%==9 set INDEX=10
23
if %INDEX%==8 set INDEX=9
24
if %INDEX%==7 set INDEX=8
25
if %INDEX%==6 set INDEX=7
26
if %INDEX%==5 set INDEX=6
27
if %INDEX%==4 set INDEX=5
28
if %INDEX%==3 set INDEX=4
29
if %INDEX%==2 set INDEX=3
30
if %INDEX%==1 set INDEX=2
31
if %INDEX%==0 set INDEX=1