Skip to main content
Known Participant
October 14, 2008
Question

GIF File extension case

  • October 14, 2008
  • 3 replies
  • 569 views
Hello,

Is there a way to change the extension of a batch of .GIF files from x.gif (small letters) to x.GIF (capital letters) using coldfusion codes.

The reason I need to perform this operation is that am accessing these files on Linux and since Linux is Case-Sensitive, I need to keep only one type of file extension (either small letters of capital).

Note that right now, i have several folders consisting of gif files, some are which are saved as.gif while others as .GIF.

Any help on this issue will be much appreciated.

Thanks
This topic has been closed for replies.

3 replies

FlexyBoyAuthor
Known Participant
October 16, 2008
Hello All,

I managed to do this using a software called "RenameIt"

But I will try the CF solution as well.

Thx
Inspiring
October 15, 2008
Look up the usage of ucase( ) and lcase( ). These will either convert a string to lowercase or uppercase.

Use cfdirectory to loop over the file and use cffile to rename the file to whatever case you want

Basic example:

Participating Frequently
October 14, 2008
sure, there's a number of options available.

There's a piece of software called Ant Renamed available here or it would be pretty trivial to write a CF template (since we're on CF support forums) that performs a CFDIRECTORY listing the files and then looping over them and renaming them.