linux脚本:提取文件到文件夹

@echo off
::Check that the jar package exists
if not exist *.jar goto exit

::Check if the directory exists
if not exist .\192.168.1.211 md .\192.168.1.211
if not exist .\192.168.1.212 md .\192.168.1.212
if not exist .\192.168.1.213 md .\192.168.1.213
if not exist .\192.168.1.214 md .\192.168.1.214
if not exist .\192.168.1.215 md .\192.168.1.215
if not exist .\192.168.1.216 md .\192.168.1.216

::Copy the packages to their respective directories


echo The files is being copied,please wait.....
for  %%i in (
 cache-1.0-SNAPSHOT.jar 
 convert-1.0-SNAPSHOT.jar 
 eureka-1.0-SNAPSHOT.jar 
 invoice-1.0-SNAPSHOT.jar 
 system-1.0-SNAPSHOT.jar) do (
copy /y %%i .\192.168.1.211\
copy /y %%i .\192.168.1.212\)

for  %%i in (
 config-1.0-SNAPSHOT.jar 
 difference-1.0-SNAPSHOT.jar 
 gather-1.0-SNAPSHOT.jar 
 handAdjustment-1.0-SNAPSHOT.jar 
 incomeAndPayment-1.0-SNAPSHOT.jar ) do (
copy /y %%i .\192.168.1.213\
copy /y %%i .\192.168.1.214\)

for  %%i in (
 basicdata-1.0-SNAPSHOT.jar 
 pull-1.0-SNAPSHOT.jar 
 report-1.0-SNAPSHOT.jar 
 tally-1.0-SNAPSHOT.jar 
 webservice-1.0-SNAPSHOT.jar 
 zuul-1.0-SNAPSHOT.jar ) do (
copy /y %%i .\192.168.1.215\
copy /y %%i .\192.168.1.216\)

echo the files copy is completed.
pause&exit

:exit 
echo The jar package is not exist in the current dirctory.
exit

你可能感兴趣的:(linux)