How can we identify if the branch view is active.
I am trying to do this
1. In a folder with lots (say 10) folders, I enter a branch view after selecting few (say 5) of them
2. Within those folder, I move files to some other folders
3. I want to delete those folders which the branch view is active on if they don't have any files in them. (most times there wouldn't be any files, but a check would be good).
Scripting - How to identify branch view
Re: Scripting - How to identify branch view
mh, use a listpane(, ,2, "<crlf>");
remove the current path + trailing backslash via a regexreplace (escape the path before)
and then a regexmatch / gettoken(..., "count") to see if there are still backslashes in that result?
Adding branch view to get("view"); would ofc be a whole lot easier...
remove the current path + trailing backslash via a regexreplace (escape the path before)
and then a regexmatch / gettoken(..., "count") to see if there are still backslashes in that result?
Adding branch view to get("view"); would ofc be a whole lot easier...
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting - How to identify branch view
The /:flat switch is present in a branch view.
Highend, congrats for joining the 3000 club!
Highend, congrats for joining the 3000 club!
- Attachments
-
- highend3000.png (1.75 KiB) Viewed 1068 times
FAQ | XY News RSS | XY Twitter
Re: Scripting - How to identify branch view
Thanks highend and congrats.
Don't know why you asked to remove the current path. This list only the folders that have the branch view enabled (including subfolders). For my needs, I wouldn't be having those sub-folders. Regardless, even if they are and are empty, the delete command would silently ignore it (since they would no longer be present as the parent would have been deleted earlier on).
However; how can I be certain that this is a branch view.
Don,
I thought about reading the /flat from address bar, but didn't a find a way to read what is in the address bar.
Code: Select all
if (!listpane(, , 1, "|"))
{
$selitems = listpane(, ,2, "|");
goto "<curpath>" ;
delete 1, 1, "$selitems";
}
However; how can I be certain that this is a branch view.
Don,
I thought about reading the /flat from address bar, but didn't a find a way to read what is in the address bar.
Re: Scripting - How to identify branch view
Damn, I'm deleting my last 1000 posts in a sec!Highend, congrats for joining the 3000 club!
I thought about reading the /flat from address bar, but didn't a find a way to read what is in the address bar.
Code: Select all
text tab("get", "term");
One of my scripts helped you out? Please donate via Paypal
Re: Scripting - How to identify branch view
Thanks. I never looked it at that way.