Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
625 B

  1. setlocal ENABLEDELAYEDEXPANSION
  2. set asms_dir=%_nttree%\asms
  3. if not "%1"=="" set asms_dir=%1
  4. if /i "%Comp%" NEQ "Yes" goto :NoCompress
  5. set sxstmpfile=%temp%\sxs-compress-%random%
  6. dir /s /b /a-d %asms_dir% | findstr /v .man | findstr /v /r "_$" > %sxstmpfile%
  7. echo Compressing files (with update and rename) in %asms_dir%
  8. for /f %%f in (%sxstmpfile%) do (
  9. call :DoWork %%f
  10. )
  11. set sxstmpfile=
  12. goto :EOF
  13. :DoWork
  14. set mytemp=%1
  15. set mytemp2=!mytemp:~0,-1!_
  16. if exist %mytemp2% del %mytemp2%
  17. compress -s -zx21 %1 %mytemp2%
  18. del %1
  19. goto :EOF
  20. :NoCompress
  21. echo Not compressing files in %asms_dir% - Env. var "COMP" not set.
  22. goto :EOF