Arexx (64/67)

From:Omphalos Viska
Date:24 Oct 99 at 09:46:30
Subject:Re: Filenumbering

From: Omphalos Viska <viska@btinternet.com>

Hello Michael

On 20-Oct-99, you wrote this along the subject of `[arexx] Filenumbering':

> From: Michael Jaccoud <topgun@pop.ch>
>
> Hi
>
> My Rexx knownledge is poor, and I'm hanging on a script:
>
> The Problem: I export a file from a graphic-program with everytime an
> other filecontent but with everytime the same filename... Target is to
> automatically renumber all the files because they should not be
> overwritten.
>
> So I need a routine which checks if file(.x) exists and if so give the new
> one a higher number. Ideal is when the first file has no extension but
> it's not a must :)
>
> file
> file.1
> file.2
> and so on
>
> Does anyone have a solution? The first part to show what I mean is here
> (But it makes an endless loop :( ):
>
> DO Nr=1 to 99
>
> IF (EXISTS('RAM:TEST') = 0)
> THEN ADDRESS COMMAND 'makedir ram:test'
> ELSE ADDRESS COMMAND 'makedir ram:test' || Nr + 1
>
> EXIT
>
>
>

Well I just ran that script you mentioned (with `end' on the end) and it
runs fine. If you leave it be, it will loop until it has made 100
directories and then stops. You say it loops forever. is there something i'm
missing?

Regards



Omphalos Viska --

viska@btinternet.com --
52455232 --

--------------------------- ONElist Sponsor ----------------------------

??? Computer Questions ==> Free Answers From Live Experts ! ! !
go to EXPERTCITY.COM
<a href=" http://clickme.onelist.com/ad/expertcity15 ">Click Here</a>

------------------------------------------------------------------------
ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com