bat拷贝命令

远程拷贝整个目录与其子目录

@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"
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qixiaoyu718/article/details/70314458
文章标签: bat
个人分类: 其他
上一篇sqlite常用方法
下一篇导航数据标准NDS结构简介
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭