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.
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?
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.