#Exists
For reasons that I cannot figure, the exists function in this routine always
returns 0. Can anyone tell me why?
address command
'requestfile >ram:rq'
if RC > 0 then do say "No file selected" exit
end
if ~open(1list,'ram:rq','r') then exit
RESULT = readln(1list) parse var RESULT lead '.' num'.' trail
do i=1 to 9999
fn= lead'.'i'.'trail
say i fn exists(fn)
if ~exists(fn) then leave
'rename >nil: ' fn 'as' lead'.'right('000'i,4)'.'trail end
ANy help would be appreciated.
-ash