- @echo off
- set "src=A"
- set "dst=B"
- @REM robocopy "%src%" %dst% * /E /Create /MT
- for %%A in ("%src%") do set "src=%%~fA"
- for %%A in ("%dst%") do set "dst=%%~fA"
- md "%dst%" 2>nul
- xcopy "%src%\*" "%dst%" /E /T /Y
- for /r "%src%" %%A in (*) do (
- set "f=%%~fA"
- set "z=%%~zA"
- setlocal enabledelayedexpansion
- set "f2=!f:%src%=%dst%!"
- fsutil file createNew "!f2!" !z!
- endlocal
- )
- pause
复制代码
|