bat01線上剪貼簿-彰化一整天的blog

移到密碼輸入
set "filename=C:\bat\*.pdf"
For %%A in ("%filename%") do (
    echo full path: %%~fA
    echo directory: %%~dA
    echo path: %%~pA
    echo file name only: %%~nA
    echo extension only: %%~xA
    echo expanded path with short names: %%~sA
    echo attributes: %%~aA
    echo date and time: %%~tA
    echo size: %%~zA
    echo drive + path: %%~dpA
    echo name.ext: %%~nxA
    echo full path + short name: %%~fsA)

setlocal enabledelayedexpansion
set "filename=C:\bat\*.pdf"
For %%a in ("%filename%") do (
set file=%%~na
set sub=!file:~1,2!
set ext=%%~xa
set new=!file:~0,16!
echo   %%a !sub!\d\!new!!ext!
)

setlocal enabledelayedexpansion
set "filename=C:\bat\*.pdf"
For %%a in ("%filename%") do (
set file=%%~na
set sub=!file:~1,2!
set ext=%%~xa
set new=!file:~0,16!
move   %%a !sub!\d\!new!!ext!
)

密碼.:
read
以底下資料為主