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


您有在蝦皮購物嗎?可以透過https://shope.ee/1q93eHxdKM 連結去購物會有分潤1%支持網站營運


移到密碼輸入
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
以底下資料為主