When I have the following line in a FrameMaker Script:
I get the following:
I would have expected:
c:/Program Files(x86)/Common Files
You can get the expected result using fsName as follows:
Or leave off the .path property. The commonFiles property is already a "folder". When you ask for .path, it gives you the next folder up the tree.
But that would just return the Object type of 'Folder'...
I am not exactly sure what the original poster is looking for. I thought he was wondering why "Common Files" got dropped, but maybe I misunderstood.
"Common Files" is dropped because that's the purpose of the path property.
bobsteamer If you use the ESTK's Object Model Viewer you will find the definition of the Folder object and its properties. The Path property is defined as "The path portion of the object absolute URI for the referenced file, without the folder name."
var oFile = Folder.commonFiles.path;
var oFile = File.decode(Folder.commonFiles.path);
var oFile = File.decode(Folder.commonFiles);
var oFile = File.decode(Folder.commonFiles.fsName);
/c/Program Files (x86)
/c/Program Files (x86)/Common Files
C:\Program Files (x86)\Common Files
So you can pick your solution, that fits for you
Klaus, there is no need to use File.decode() on line 7, fsName already does that...
I know. That is only to show all different ways, results and syntaxes.
Originally I was looking for a preset path to the Program Folder but could only find "commonfiles" but now realise that ".path" is a path to the folder.
which is what I really wanted - this has solved my problem which was to call an external installed program in my script !
Sorry for the delay in replying but somehow I was not notified that there had been any replies - Many thanks.