RTTSoftware Support Forum
PDF Explorer => Ideas/Suggestions => Topic started by: RW on July 21, 2015, 06:32:24 PM
-
Could a column be created that just shows the "current folder" name of the current file, not all the other folders that this current folder is nested under.
And this column would need to be exportable to a csv file also.
I don’t want the column that has all this c:\pictures\2015\summer\
I just want the column to show only the last folder called summer\ or summer
-
As with the column part of this example (http://www.rttsoftware.com/forum.php?dsturl=http%3A%2F%2Fwww.rttsoftware.com%2Fforum%2Findex.php%3Ftopic%3D504.msg1382%3Btopicseen%23new), set a custom field, with a custom grid layout to show it, and use the Edit Info Fields batch tool with this GetParentFolderName named script.
function GetParentFolderName() {
var path = BatchFile.Filename.substring(0,BatchFile.Filename.lastIndexOf('\\'));
//remove parent folders
path = path.substring(path.lastIndexOf('\\')+1);
return path;
}
-
Or just use a custom grid layout dynamically calculated column (http://www.rttsoftware.com/Manuals/Index.htm?pageURL=PDFE/English/LayoutEditor.htm#calculated_columns), with this code as the eval expression:
begin
var 'i','path' end;
$path:=leftstr(FP,length(FP)-1);
$i:=pos('\',reversestr($path));
return(rightstr($path,$i-1));
end