home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 May / cica_0595_4.zip / cica_0595_4 / UTIL / LOCKAP22 / AD0001.BAT next >
DOS Batch File  |  1994-12-01  |  817b  |  37 lines

  1. @echo off
  2. rem
  3. rem    AD0001.BAT    Steve Clarke    May 1994
  4. rem
  5. rem    Demo file showing how an administrator can remove all locks for
  6. rem    a specified machine.  He should be sure that nobody is running
  7. rem    any programs on the machine first.
  8. rem
  9.  
  10. set CONTROL=L:\LOCK\CONTROL
  11.  
  12. if q%1==q goto NoCmdLine
  13.  
  14. if exist %CONTROL%\*.%1 goto Files
  15. if exist %CONTROL%\*._%1 goto Files
  16. echo There are no lock files for machine %1
  17. goto Fin
  18.  
  19. :Files
  20. rem 
  21. rem Some networks (eg PCNFS) will not allow a user to change file permissions
  22. rem on another user's files.  This may not be the case with your network.
  23. rem
  24. attrib -r %CONTROL%\*.%1 > NUL
  25. attrib -r %CONTROL%\*._%1 > NUL
  26. del %CONTROL%\*.%1 > NUL
  27. del %CONTROL%\*._%1 > NUL
  28.  
  29. goto Fin
  30.  
  31. :NoCmdLine
  32. echo Usage: AD0001 [Machine_name]
  33.  
  34. :Fin
  35. set CONTROL=
  36. echo Done
  37.