home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / srcmac.zip / CHECKIN.REX next >
OS/2 REXX Batch file  |  1994-05-11  |  1KB  |  22 lines

  1. /* CHECKIN.CMD - Checks the current SourceLink file into SourceSafe */
  2.  
  3. 'S_GET_BUFF_FILENAME' 0 OrigName                        /* Get current file name */
  4.  
  5. /* 'S_CLOSE_SL_FILE' 0   */                                  /* Close the current file */
  6.  
  7. 'S_SAVE_CURR_FILE'                                      /* Save current file */
  8.  
  9. 'S_CHG_EDITMODE'                                        /* Change edit mode */
  10.  
  11. /* Change directory to the directory of the current SourceLink file */
  12.  
  13. LastSlashPos = LASTPOS('\',OrigName)                    /* Find the position of last slash */
  14. PathName = LEFT(OrigName,LastSlashPos-1)                /* Trim off filename at the end of the string */
  15. 's_cd "'PathName'"'                                     /* Change directory to current file directory */
  16.  
  17. NewName = RIGHT(OrigName,LENGTH(OrigName)-2)            /* Strip off the drive: from the name */
  18.  
  19. /* Call SourceSafe to update file */
  20. 'Start "Update SourceSafe" /win /max l:\macros\updateit' NewName '> con: 2> con: < con:'  
  21.  
  22.