Batch的父文件夹位于Variable%〜dp0中.例:
@echo off&setlocal for %%i in ("%~dp0..") do set "folder=%%~fi" echo %folder%
@echo off&setlocal for %%i in ("%~dp0..") do set "folder=%%~fi" echo %folder%