Is there any script or feature in branch view, to copy folder tab indents to clipboard?
Eg., then you can paste entire multiple directory structures into MS Word and apply multilevel numbering which is useful for an index.
Branch view, copy indents to clipboard?
-
- Site Admin
- Posts: 59751
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Branch view, copy indents to clipboard?
This report feature does something similar:
- Attachments
-
- 2023-11-13_092805.png (8.58 KiB) Viewed 295 times
FAQ | XY News RSS | XY Twitter
Re: Branch view, copy indents to clipboard?
You use what Don posted with the button "To Clipboard" and then execute this script afterwards:
Code: Select all
$indention = " "; // E.g. 4 spaces
// Get only folders
$result = formatlist(<clp>, "f", <crlf>, "*<DIR>*");
// Remove unnecessary stuff
$result = regexreplace($result, "; <DIR>;.+?(?=\r?\n|$)");
// Replace indention
$result = replace($result, ". ", $indention);
// Remove leading "\ "
$result = replace($result, "\ ");
text $result;
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de
Re: Branch view, copy indents to clipboard?
Thank you!
Re: Branch view, copy indents to clipboard?
Is there a way to strip the extra info (extension onwards) from subfiles as well & include tab indents from branch view? Think above script only handles directories.
EDIT: Must have been doing something weird, now it indents everything, but still want to get rid of this stuff:
1. in directories, the ending: -, <DIR>, 2023/12/14 10:15:01
2. file endings including extension: .pdf", 327,935, 2023/12/12 14:17:59
3. All quotation marks
4. Don't replace periods in the file name with spaces--only the periods before the file name start (before the quotations)
EDIT: Must have been doing something weird, now it indents everything, but still want to get rid of this stuff:
1. in directories, the ending: -, <DIR>, 2023/12/14 10:15:01
2. file endings including extension: .pdf", 327,935, 2023/12/12 14:17:59
3. All quotation marks
4. Don't replace periods in the file name with spaces--only the periods before the file name start (before the quotations)
Re: Branch view, copy indents to clipboard?
I've given you the basics to process the raw data. Now add the necessary regexes to get the output you need?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de