this is my batch code:

@echo off

echo 1. Change all folders and subfolders named ".previews" to "Imgs" (to MIYOO)
echo 2. Change all folders and subfolders named "Imgs" to ".previews" (to Adam Image)
set /p choice=Enter your choice (1 or 2):

if "%choice%"=="1" (
  for /d /r . %%G in (".previews") do (
    if exist "%%G" (
      ren "%%G" "Imgs"
      if errorlevel 1 echo Failed to rename %%G to Imgs.
    )
  )
  echo All folders and subfolders named ".previews" have been renamed to "Imgs".
)

if "%choice%"=="2" (
  for /d /r . %%G in ("Imgs") do (
    if exist "%%G" (
      ren "%%G" ".previews"
      if errorlevel 1 echo Failed to rename %%G to .previews.
    )
  )
  echo All folders and subfolders named "Imgs" have been renamed to ".previews".
)

pause