發表文章

目前顯示的是 4月, 2025的文章

Automatically classify folders by file name (windows Bash)

  REM List file names, sorted by file name--------- dir /b /on > list.txt REM Find JPG files findstr ".JPG" list.txt > target.txt rem delete file extension------------------------- @echo off & setlocal enabledelayedexpansion rem reads all the contents of target.txt for /f "eol=* tokens=*" %%i in (target.txt) do ( rem sets variable a to the content of each line set a=%%i rem If the line has .JPG, change it to set "a=!a:.JPG=!" rem saves all modified lines into $ echo !a!>>$) rem replaces the original a.txt content with the content of $ move $ target.txt REM Create folder----------------------------- rem reads all the contents of target.txt for /f "eol=* tokens=*" %%i in (target.txt) do ( set string=%%i echo "%%i" for /f "tokens=1,2 delims=_" %%a in ("%%i") do ( set BEFORE_UNDERSCORE=%%a set AFTER_UNDERSCORE=%%b echo %%a md %%a rem Move files to folder move %%i*.* %%a )) del list.txt del target.txt

Blocking software access to the Internet

圖片
  第一個步驟先打開控制台   在右上角搜尋防火牆 點擊 Windows 防火牆 再點擊左邊下面有個進階設定 會出現以下 點擊左邊輸入規則 再點擊新增規則 點擊程式直接下一步   選擇要禁止的程式 在點下一步   點擊封鎖連線 再按下一步 勾選全部 再點擊下一步   填完直接按完成 這樣軟體就無法聯網囉