trimdirs
trimdirs removes the last n directories from the end of a path; for example, trimdirs 1 changes /Users/Me/Pd/Synths to /Users/Me/Pd. It handles spaces, and with no argument or an argument of 0 it passes the input through unchanged.
AI Generated
This content was generated with the assistance of AI. If you notice any errors, please report them or submit a fix using Submit. Check the prompt used here.
- Download via Deken.
Open
Pdand go toToolsFind Externals. Search forsfruitand install it. Then create an object withdeclare -lib sfruit -path sfruit. Finally, usetrimdirsor any other object fromsfruit.