One Option is:

        File newUniqueFile = File.createTempFile(String prefix, String suffix, 
File directory) 

for example

        File newUniqueFile = File.createTempFile("MyFile-", ".txt", myDir) 

might make a file named:

        MyFile-0232837232.txt


Another option is:

        ERXFileUtilities.reserveUniqueFile(File, boolean)

On Jan 31, 2012, at 3:14 PM, Gino Pacitti wrote:

> Hi All..
> 
> How can I manipulate the file name so I can make it distinct when saved to a 
> directory - Idea is to not have two similar file names in same directory...
> 
> Gino
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to