Re: Manipulating Filename of AjaxFileUpload
Re: Manipulating Filename of AjaxFileUpload
- Subject: Re: Manipulating Filename of AjaxFileUpload
- From: Kieran Kelleher <email@hidden>
- Date: Tue, 31 Jan 2012 19:21:24 -0500
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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden