创建目录结构和空文件

@echo off
set source=D:\test
set target=E:\my
if not exists "%source%\" md "%target%"
xcopy/e/t "%source%" "%target%">nul
for /f "delims=" %%i in ('dir/b/a-d/s "%source%\"') do (
echo. %%~nxi
set nf=%%i
call set nf=%%nf:%source%=%target%%%
call copy nul "%%nf%%">nul
)

编程技巧