Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- REM Check if plugnist.txt exists
- if not exist plugins.txt (
- echo plugins.txt not found.
- pause
- exit /b
- )
- REM Read plugnist.txt into an array
- set i=0
- for /f "eol=# delims=" %%f in (plugins.txt) do (
- set /a i+=1
- set "file[!i!]=%%f"
- )
- set count=%i%
- REM Touch files from top to bottom so the last one becomes most recent
- for /l %%i in (1,1,%count%) do (
- set "filename=!file[%%i]!"
- if exist "!filename!" (
- powershell -NoProfile -Command "(Get-Item -LiteralPath \"!filename!\").LastWriteTime = Get-Date"
- echo Touched !filename!
- ) else (
- echo File not found: !filename!
- )
- )
- endlocal
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement