- @echo off
- cd /d "%~dp0"
- REM 设置software分隔符 _或空格
- set "delims= "
-
- for /d %%A in ("C:\Program Files\xxx\software%delims%*" "C:\Program Files (x86)\xxx\software%delims%*") do (
- for /f "tokens=1* delims=%delims%" %%B in ("%%~nxA") do (
- if exist "DATA%delims%%%~C\" (
- md "%allusersprofile%\Application Data\xxx\software%delims%%%~C\DATA%delims%%%~C" 2>nul
- xcopy "DATA%delims%%%~C\*" "%allusersprofile%\Application Data\xxx\software%delims%%%~C\DATA%delims%%%~C\" /E /H /R
- )
- )
- )
-
- pause
- exit /b
复制代码
|