Page 1 of 1
Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 14:50
by daniel_m
I love that we can use folderreport to quickly get customised file/folder reports. Unfortunately, the folderreport types with relative paths don't support format templates.
E.g. I'd like to copy files and their size within a folder and it's subfolder to the clipboard:
folderreport("filesrel:{fullname}<tab>{size br}","r",,"r");
This works perfectly fine with "files", but not with "filesrel" (as stated in the XYplorer help file).
Re: Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 15:25
by daniel_m
Okay, while I still find it useful to add formatting to relative folderreport types, because it is very intuitive, I found a way to get what I want:
copytext replace(folderreport("files:{fullname}<tab>{size br}","r",,"r"),getpathcomponent(, "full")."\","");
Re: Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 15:29
by admin
filesrel works well. Not sure what you want. Give an example.
Re: Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 16:14
by daniel_m
It doesn't work on my end.
When I execute
text folderreport("files:{fullname}<tab>{size br}","r",,"r");
in a certain folder, I get
D:\Zigbee\zigbee2mqtt\data\extension\automations.js 48324
Notice the file size sepparated by a tab.
Whith
text folderreport("filesrel:{fullname}<tab>{size br}","r",,"r");
I get automations.js
The formatting (tab and size) is missing.
According to the help file, this is not unexpected behaviour. Only Types "tree", "treeitems", "dirs", "files", and "items" support a format template.
Re: Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 17:03
by admin
I see. It will work in the next beta.
Re: Support format template for relative folderreport types filesrel/dirsrel/itemsrel
Posted: 19 Dec 2024 17:27
by daniel_m
Awesome, thanks a lot.
Whish you a nice end of the year!