CMD 移除前輟字元、並移動資料到新資料夾

這個是command BAT檔的語法

動作>
如果fs123456資料夾存在
去除前輟兩個字元
然後將資料搬移過去
並顯示預估時間



setlocal EnableDelayedExpansion
set newUser=fs123456
set mask=%newUser:~0,2%
call set oldUser=%%newUser:%mask%=%%
echo %oldUser%
IF EXIST "F:\%oldUser%" (robocopy %oldUser% %newUser% /E /move /TEE /ETA)

footer See also :

留言

這個網誌中的熱門文章

Office 2021 離線安裝封裝與KMS啟動步驟

Ollama使用心得與模型導入教學

ARC下NSMutableDictionary 無法使用retainCount