Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- :: List all .php files in the directory and output to tree.txt
- dir /AA /B /ON ".\Linedancer 2\*.php" > ".\tree.txt"
- :: Create an empty list.txt file
- type nul > ".\index.txt"
- :: Initialize the count variable
- set count=0
- :: Loop through each file in tree.txt
- for /F "delims=" %%i in (".\tree.txt") do (
- :: Append the content of each file to list.txt
- echo ".\Linedancer 2\%%i"
- type ".\Linedancer 2\%%i" >> ".\index.txt"
- :: Increment the count
- set /a count+=1
- :: Add a blank line between files, but not after the last file
- if !count! gtr 0 (
- echo. >> ".\index.txt"
- )
- )
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement