/* Cear out any lock files left after a system crash */

rqueue = 'slip:' 
findfile = 't:ProcLock'

say 'Searching for Lock Files...'

/*  Run find to search for the .lck files that NOS leaves lying about.  */

address command 'find >' || findfile rqueue '-name *.lck -print'

/*  Process the findfile file by file                                   */

if ~open( findfile, findfile, 'R' ) then do
	say 'Error Opening Work File. (' || findfile || ')'
	exit 1

	end

do forever

	folder = readln(findfile)
	if eof(findfile) then leave

	say 'Deleting ' folder 
	address command 'delete >nil:' folder 
	end          

close( findfile )

exit
