.bat文件基于操作系统的xcopy


Answers:


0

试试这个:

@echo off
setlocal EnableDelayedExpansion

for /F "delims=" %%a in ('ver') do set ver=%%a
set Version=
for %%a in (95=95 98=98 ME=ME NT=NT 2000=2000 5.1.=XP 5.2.=2003 6.0.=Vista 6.1.=7 6.2.=8) do (
   if "!Version!" equ "this" (
      set "Version=%%a"
   ) else if "!ver: %%a=!" neq "%ver%" (
      set Version=this
   )
)
goto:_%version% 2>nul || goto:eof

:_xp
:_7
xcopy /?

© dosacpsAacini

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.