远程拷贝整个目录与其子目录
@echo off
echo .
echo ...initing
set str_time_first_bit="%time:~0,1%"
if %str_time_first_bit%==" " (
set str_date_time=%date: ~0 ,4 %%date:~5,2% %date: ~8 ,2 %_0 %time: ~1 ,1 %%time:~3,2% %time: ~6 ,2 %
)else (
: :set str_date_time=%date: ~0 ,4 %%date:~5,2% %date: ~8 ,2 %_ %time: ~0 ,2 %%time:~3,2% %time: ~6 ,2 %
set str_date_time=%date: ~0 ,4 %%date:~5,2% %date: ~8 ,2 %
)
set dataPath=%~sdp0 \%str_date_time%CHN
rd %dataPath% /s /q
echo "Create Folder: %dataPath%"
md "%dataPath%/dataa"
md "%dataPath%/datab"
echo "拷贝中国数据 \\192.168.168.189\data"
xcopy /e /d "\\192.168.168.189\dataa" "%dataPath%/dataa"
echo "拷贝MESH完成"
echo "拷贝中国数据 \\192.168.168.189\16q3\ROOT\ALL"
xcopy /e /d "\\192.168.168.189\16q3\ROOT\ALL\AD" "%dataPath%/ALL"
xcopy /e /d "\\192.168.168.189\16q3\ROOT\ALL\AOI" "%dataPath%/ALL"
echo "拷贝ALL完成"
echo "删除.shp/.shx文件"
cd /d %dataPath%
del /s /q /f *.shp *.shx
echo "删除完成"
pause
: :for /d %%i in (*) do rd /s /q "% %i"