I'm not following this closely, sorry.

But you want to just rename files and directories to their lowercase equivalent? You could use the regexp <mapper> in Ant with <copy>, which may be able to do it... but I don't have time right this second to give it a try.

You could certainly go the route, if you need to stick with Ant and have Rhino or some other BSF language available, using <script> to do it.

The <zip> task won't really help you here - it certainly doesn't have a "rename to lowercase" switch :)

Erik

On Mar 18, 2004, at 11:19 AM, Warner Onstine wrote:

Thanks Vince,
I have started to investigate this. What I would like to do is to use it with Ant FileSets, so I have started looking at the ZipTask to see what I would need to do (any help from Erik on this would be great, hint hint ;-).


-warner

On Mar 17, 2004, at 4:42 PM, [EMAIL PROTECTED] wrote:

I would forget about copying them and just use the File class and ZipOutputStream to read the mixed case files with embedded spaces while writing a zip file with lowercase names and underscores. Should be pretty simple and you wouldn't have to create a copy of everything and then zip it as another step.
From: Warner Onstine <[EMAIL PROTECTED]>
Date: March 17, 2004 4:22:33 PM MST
To: [EMAIL PROTECTED]
Subject: [jug-discussion] i'm lazy ;-), copy/move uppercase files/folders to lower-case
Reply-To: [EMAIL PROTECTED]



Hi all,
I have to write a task that takes a group of directories convert them to all lowercase (including filenames) and then zip them up. Originally I was going to do this in PHP (haven't had a real java project in a loooong time), then I had some inspiration to use Ant!


I'm looking through the implementation of the copy task right now, and I found an example of something that used RandomAccessFile to convert the folder and filenames to lowercase (but I'm not sure exactly what that's doing).

So, I thought I'd throw this out to the list to see if anyone had done something similar already or had any suggestions. I'll be pounding on this tomorrow.

Oh, an additional constraint, I need to replace any spaces in the file or folder names with underscore (gotta love windows users ;-).

Thanks for the help!

-warner



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to