home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
steward8.zip
/
UnLock.cmd
< prev
Wrap
OS/2 REXX Batch file
|
1996-04-03
|
492b
|
30 lines
/* ------------------------------------------------------------------ */
/*
* UnLock
*
* Unlock a file.
*
*/
TRUE = 1
FALSE = 0
UnLock:
parse arg FileName
/* first close the lock file */
LockName = FileName.'lock'
rc = stream(LockName, 'C', 'CLOSE')
parse var rc state ':' code
if state = 'NOTREADY' then
return FALSE
/* Delete the lock file */
call RxFuncAdd 'SysFileDelete', 'RexxUtil', 'SysFileDelete'
rc = SysFileDelete(LockName);
return TRUE