Rename CASE command

Is it just me or are none of these working in 12.0.12?

Rename CASE=upper
Rename CASE=lower
Rename CASE=firstword
Rename CASE=allwords
Rename CASE=extupper
Rename CASE=extlower

I downgrade to 12.0.11 and then they rename successfully.
Could it be related somehow with DO12 - Command Editor, Select Icon dialog ?

Thanks for the report, it will be fixed soon.

Has this been fixed yet? I appear to be having the same issue. At least for "CASE=lower".

Rename CASE=lower works fine here.

What problem are you having with it?

Thank you for the quick reply, Leo! I think I've figured out what the issue is. Apparently, if you create an item object using DOpus.FSUtil.GetItem, it will use whatever letter casing you passed it rather than the actual case of the file. For example, assume I have a file called "D:\test\someFile.txt". The following code (in JScript) will output "D:\test\somefile.txt" to the log window (note the difference in casing).

var f = DOpus.FSUtil.GetItem("D:\\test\\somefile.txt");
DOpus.Output(f);

My problem occurred when I then tried to run the following command:

clickData.func.command.RunCommand("Rename CASE=lower \"" + f + "\"");

It appears that if the filename is already lowercased in the parameters, then the Rename command won't bother running (even if the file that it's referring to actually has mixed casing). If I run the following Rename command instead (with casing that doesn't match the actual file), then it DOES rename the file to lowercase.

clickData.func.command.RunCommand("Rename CASE=lower \"D:\\test\\somefilE.txt\"");

I'm not sure if this functionality is intended or if I've stumbled across a couple of bugs here. Is there some way to force the Rename process to run, even when you feed it a lowercased filename? Or is there some way to get the DOpus.FSUtil.GetItem object to use the actual casing of the filename in it's properties? Or am I just going about this the wrong way?

Thanks for your help!

Where is the wrong-cased path that you're giving to GetItem coming from?

I'm testing for the existence of several specific files in a directory which may have a number of other files as well. If any of the specific files are there, then I want to make sure that they're lowercased. So, the "wrong-cased path" is just my hard-coded list of filenames.

I could just read in the listing of all files in the directory and then check each one until I've found what I'm looking for. That works, but I'd rather avoid doing it that way because that seems less efficient to me.

If it's a hardcoded list, you should be able to make things work by making the names in the list mixed-case.

You can also get Opus to look-up the real case of the filename part like this:

That did the trick! Thank you so much for your help, Leo! :grinning: