how to create a custom action for a folder?
It can be done for files but not for folders
There is a scrip for doing so in Daz shop but doesnt work, probably intended for older daz versions. Also somebody mentioned there was a script sample for doing so in the help section of DAZ but I can not fint it any more.

Comments
You mean a script to take a content pane to a specific location? Do you mean a literal folder (under Poser Formats/Daz Studio Formats, not in the Daz Connect container) or are you wanting categories/products/virtual folders (under Daz Connect) too?
I mean the ones that go to here (attached)
I would love to be able to simply place there a link to my hair folder from "my daz library" (for example) and be able to navigate from there in the content library, with the added benefit of shortcuts.
I know you can do it using categories section, but the work of digging the categories section is nearly the same than using the "my daz library" and both compite in the same tree window, meaning, once you are in the "my daz library" (Daz studio formats) is a hassle to return to the categories section, and viceversa.
That script that I bought today was suppose to do exactly that but when installed it creates the folders DS2 and DS3 and doesnt work, making me think was not designed for DS4. And also I wonder how to get a refund.
Its also a pity that DAZ can create shortcuts of files simply draguing them in "my daz library" but wont allow shortcuts for folders with the same system. And to make things worse, you can not right click in the shortcut to access the original file folder. Many times one asset wont come alone, for example a hat can need also to choose the materials, and to create the links for hat and materials is too much work.
These scripts show how it's done - you should just need to edit the path on the last line for the appropriate example. http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start
Thanks! it works
A note for anyone tries to use it, Windows will give you this path (for example)
People\Genesis 8 Female\Hair
But only will work if you reverse the folder sign from \ to /
People/Genesis 8 Female/Hair