home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / multiworks_install / rexx / cddir.mw < prev   
Text File  |  1996-06-23  |  1KB  |  51 lines

  1. /*******************************************************/
  2. /* Test-ARexx-Script für das Locken von Verzeichnissen */
  3. /* © 1995 Synetic Software                                                         */
  4. /* Geschrieben von Holger Ankermann                                         */
  5. /*******************************************************/
  6.  
  7. address command
  8. options results
  9. if ~SHOW("PORTS", "rexx_mwdatabase") then    do
  10.     'Run >NIL: <NIL: MultiWorks:MWDatabase'
  11.     wait 5
  12.     address 'rexx_mwdatabase' DBToBack    /* Screen nach hinten */
  13.     end
  14. else
  15.     address 'rexx_mwdatabase' DBToBack    /* Screen nach hinten */
  16.  
  17.  
  18. /*---------------------------------------------------------------------*/
  19. /* Ein einfacher test für das Locken und UnLocken eines Verzeichnisses */
  20. /*---------------------------------------------------------------------*/
  21. verzeichnis="Root:"
  22. address 'rexx_mwdatabase'
  23. DBLock    verzeichnis
  24. dirlock=result
  25. if RC==0 then
  26.     do
  27.         say "Verzeichnis -" verzeichnis "gefunden RexxLockID=" dirlock
  28.         DBDirName dirlock
  29.         if RC == 0 then do
  30.              say "DBDirName ok name=" result
  31.          end
  32.         DBMakeDir dirlock "hallo" STAMPSDIR
  33.         if RC == 0 then do
  34.              say "DBMakeDir ok"
  35.          end
  36.         DBDeleteDir dirlock "hallo"
  37.         if RC == 0 then do
  38.              say "DBDeleteDir ok"
  39.          end
  40.         DBUnLock    dirlock
  41.         if RC == 0 then do
  42.              say "DBUnLock ok"
  43.          end
  44.     end
  45. else
  46.     say "Verzeichnis nicht da !"
  47.  
  48. /* Die Database beenden */
  49.     /*DBQuit*/
  50. exit(0)
  51.