本帖最后由 qixiaobin0715 于 2022-1-7 11:03 编辑
- @echo off
- setlocal enabledelayedexpansion
- for %%i in ("%~dp0.") do (
- set Folder1=%%~nxi
- echo,!Folder1!
- for /f "tokens=1-2* delims=- " %%a in ("!Folder1!") do (
- set xh=%%a
- set gq=%%b
- set gs=%%c
- echo,!xh!
- echo,!gq!
- echo,!gs!
- )
- )
- for %%k in ("%~dp0..") do (
- set Folder2=%%~nxk
- echo,!Folder2!
- )
- pause
复制代码
|