Hoby,

Good stuff! It works like a champ!

code:
 BREAK ON
?"Checking for loan file"
SLEEP 1
$handler="R:\WHANDLER\DATA\"
$bkloc="R:\WHANDLER\BADLOANS\"
$tspace="R:\WHANDLER\BADLOAN-WK\"
?"PLEASE CLOSE OUT OF THE LOAN, AND IF NEEDED, THE LOAN HANDLER - FIRST!"
?
?"Type in the loan number, e.g. 1000133442"
?">"
GETS $loan
;INPUT($loan)
?"Is this a .1 or .2 file? Enter in .1, for example"
?">"
GETS $ext
;INPUT($ext)
$loan="10"+RIGHT($loan,6)+$ext
?$loan
IF 0=EXIST($bkloc+$loan)
?"Copying original file to - "+$bkloc
COPY $handler+$loan $bkloc
IF 0=EXIST($tspace+$loan)
?"Copying file into a Temporary Workspace to - "+$tspace
COPY $handler+$loan $tspace
SHELL '%COMSPEC% /C qreplace.EXE '+chr(34)+$tspace+$loan+chr(34)+' "\x20\x1B+\x0A" ""'
SHELL '%COMSPEC% /C qreplace.EXE '+chr(34)+$tspace+$loan+chr(34)+' "\x1B" ""'
;MOVE $tspace+$loan $handler ; will be uncommented when code is tested and complete
?"Please check your loan: "+$loan
ENDIF
ELSE
?"Loan file already exists.."
?"Please call the Support Desk for further assistance"
?"Speed Dial #nn"
ENDIF
?"Process is complete"
SLEEP 2

FUNCTION INPUT($str)
GETS $str
IF $str=""
"PLEASE ENTER SOMETHING!"?
INPUT($str)
ENDIF
ENDFUNCTION

Thanks,

Kent

[ 02. October 2003, 04:45: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's