java prog

Hi,

I need to check if an audio file exists and if it does I need to add an incremental number to the next filename, to avoid overriding the previous one.

e.g. file01, file02 and son

At present I have the code saving a file, but when I want to creat the next file. it override the previuos one

fileType = AudioFileFormat.Type.AU;

audioFile = new File ("file.au");

Anyone got any ideas or done this sort of thing?

Cheers

[469 byte] By [hiwada] at [2007-10-2 13:11:16]
# 1
MULTIPLE POSTEDPreviously answered multiple times at http://forum.java.sun.com/thread.jspa?threadID=711455&tstart=0
hiwada at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 2
Why did you not continue here: http://forum.java.sun.com/thread.jspa?threadID=711455You were answered there.
prometheuzza at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 3
Max, now it's starting to become clear to me what you meant by Jos jr.; )
prometheuzza at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 4
> Max, now it's starting to become clear to me what you> meant by Jos jr.> ; )ROFL! ← really
prometheuzza at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 5
>Anyone got any ideas or done this sort of thing?A combination of:File.listFiles()Regular expressions
IanSchneidera at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 6
oops, didn't notice all the multi-posting
IanSchneidera at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 7
> > Max, now it's starting to become clear to me what you> > meant by Jos jr.> > ; )> > ROFL! 仼 reallyCare to enlighten this poor old soul please? ;-)kind regards,Jos
JosAHa at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 8
> Care to enlighten this poor old soul please? ;-)Who would ?!?
da.futta at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 9

> > > Max, now it's starting to become clear to me what

> you

> > > meant by Jos jr.

> > > ; )

> >

> > ROFL! 仼 really

>

> Care to enlighten this poor old soul please? ;-)

>

> kind regards,

>

> Jos

In a previous thread I addressed prometheuzz and then said " (or Jos jr as I like to call him (just kidding))". I don't know what it meant really. I was just starting my first cup of coffee and it seemed funny for reasons most attributable to collapsing synapses on my end.

da.futta at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 10
> > Max, now it's starting to become clear to me what you> > meant by Jos jr.> > ; )> > ROFL! ← reallyYes, I can imagine. The fact that it didn't occur to me at once, is a confirmation of your obsevation.; )
prometheuzza at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 11

> > > Max, now it's starting to become clear to me what you meant by Jos jr.

> > > ; )

> >

> > ROFL! 仼 really

>

> Yes, I can imagine. The fact that it didn't occur to me at once, is a confirmation of your obsevation.

> ; )

I had assumed it was a observation about your and Jos' locations.

MLRona at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...
# 12

> > > > Max, now it's starting to become clear to me what you meant by Jos jr.

> > > > ; )

> > >

> > > ROFL! 仼 really

> >

> > Yes, I can imagine. The fact that it didn't occur

> to me at once, is a confirmation of your obsevation.

> > ; )

>

> I had assumed it was a observation about your and Jos' locations.

Ignore those little perverts; us civilized folks don't even want to know

about their filthy thoughts ;-)

kind regards,

Mr. Jos Sr (< civilized to the bone)

JosAHa at 2007-7-13 10:39:23 > top of Java-index,Java Essentials,Java Programming...