Advertisement
Lavallet

order_plugins

May 12th, 2025 (edited)
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.70 KB | Gaming | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3.  
  4. REM Check if plugnist.txt exists
  5. if not exist plugins.txt (
  6.     echo plugins.txt not found.
  7.     pause
  8.     exit /b
  9. )
  10.  
  11. REM Read plugnist.txt into an array
  12. set i=0
  13. for /f "eol=# delims=" %%f in (plugins.txt) do (
  14.     set /a i+=1
  15.     set "file[!i!]=%%f"
  16. )
  17. set count=%i%
  18.  
  19. REM Touch files from top to bottom so the last one becomes most recent
  20. for /l %%i in (1,1,%count%) do (
  21.     set "filename=!file[%%i]!"
  22.     if exist "!filename!" (
  23.         powershell -NoProfile -Command "(Get-Item -LiteralPath \"!filename!\").LastWriteTime = Get-Date"
  24.         echo Touched !filename!
  25.     ) else (
  26.         echo File not found: !filename!
  27.     )
  28. )
  29.  
  30. endlocal
  31. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement