Arexx (41/67)

From:Michael Jaccoud
Date:20 Oct 99 at 18:19:31
Subject: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



Gruss, Michael Jaccoud

--------------------------------------------------------
Best regards Return mail address:
Michael Jaccoud topgun@pop.ch
--------------------------------------------------------

--------------------------- 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