Advertisement
jargon

LD2 Dump.cmd

Nov 9th, 2024
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.67 KB | Gaming | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3.  
  4. :: List all .php files in the directory and output to tree.txt
  5. dir /AA /B /ON ".\Linedancer 2\*.php" > ".\tree.txt"
  6.  
  7. :: Create an empty list.txt file
  8. type nul > ".\index.txt"
  9.  
  10. :: Initialize the count variable
  11. set count=0
  12.  
  13. :: Loop through each file in tree.txt
  14. for /F "delims=" %%i in (".\tree.txt") do (
  15.    
  16.     :: Append the content of each file to list.txt
  17.     echo ".\Linedancer 2\%%i"
  18.     type ".\Linedancer 2\%%i" >> ".\index.txt"
  19.  
  20.     :: Increment the count
  21.     set /a count+=1
  22.  
  23.     :: Add a blank line between files, but not after the last file
  24.     if !count! gtr 0 (
  25.         echo. >> ".\index.txt"
  26.     )
  27. )
  28.  
  29. endlocal
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement