home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Collection - Online Library - January 1996 / CKITOS2196.ISO / diskette / gg244043.dsk / unc.dsk / LS30UTIL / MOVDA.CMD < prev    next >
OS/2 REXX Batch file  |  1993-02-10  |  1KB  |  46 lines

  1. /*******************************************************************/
  2. /* MOVEDA.CMD                                                      */
  3. /*                                                                 */
  4. /* Move directory alias directory definition.                      */
  5. /* The arguments are:                                              */
  6. /*  alias           The alias name                                 */
  7. /*  newDir          New assigned directory for the alias           */
  8. /*  serverName      The name of the server on which the resource   */
  9. /*                  resides.                                       */
  10. /*******************************************************************/
  11.  
  12. parse upper arg alias newDirectory serverName
  13.  
  14. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  15. call LoadLs30utFuncs
  16.  
  17. if (alias = '') | (newDirectory = '')) then
  18.  say 'Usage: MOVDA aliasName NewPath [ServerName]'
  19.  exit 9
  20. end
  21.  
  22. /* Must have access to domain controller name */
  23. parse value GetDCName() with rc dcName
  24.  
  25. if rc <> '0' then do
  26.  say 'Could not obtain Domain Controller name'
  27.  exit 9
  28. end
  29.  
  30. if dcName = '' then do
  31.  say 'Could not obtain Domain Controller name'
  32.  exit 9
  33. end
  34.  
  35. /* Use Domain Controller name if no serverName was specified */
  36. if serverName = '' then
  37.  serverName = dcName
  38.  
  39. /* Just doit now */
  40. rc = MoveDirAlias(dcName, alias, dcName, newDir)
  41. say 'MoveDirAlias returned: ' rc
  42.  
  43. call DropLs30utFuncs
  44. exit 0
  45.  
  46.