Page 1 of 3
Understanding "Flatten Folder"
Posted: 31 Aug 2015 17:08
by Irwin of Upton
Is this correct?
The idea with Flatten Folder to get a Branch View but on a permanent basis?
Want to know for sure before doing something regrettable.
Re: Understanding "Flatten Folder"
Posted: 31 Aug 2015 17:13
by highend
It will move all files from all subdirectories from the selected folder (tree or list) into the selected folder itself and delete all emtpy subfolders of it afterwards... There are no branches left, so that's no branch view xD
Re: Understanding "Flatten Folder"
Posted: 31 Aug 2015 20:50
by Irwin of Upton
Putting the terminology aside, the Flatten Folders is doing just what was hoped for. But how to make it into a toolbar button as it doesn't seem to be issued a command number?
Re: Understanding "Flatten Folder"
Posted: 31 Aug 2015 22:16
by highend
It exists also as a scripting command "flattenfolder()"
v15.60.0004 - 2015-08-23 21:09
+ Scripting got a new function.
Name: FlattenFolder
Action: Flattens a folder.
Syntax: flattenfolder([folder], [separator=CRLF], [flags])
folder: (optional) Folder to flatten.
If missing then:
If List has focus and a folder is focused in List, then
this folder is flattened.
Else: Defaults to the current folder.
separator: Separates the items in the return value.
flags: (bit field)
1 = No prompt.
return: List of contents of the folder after being flattened; items with
full path, separated by separator.
Remarks:
- The function will auto-avoid filename collisions by affixing
increments to the new name according to the user settings
(Configuration | Templates | Filename Affixes).
- No Undo!
- Warning: This command can easily destroy a complex folder structure.
Therefore a safety prompt has to be OK-ed before the rumble begins
(unless you pass flag 1).
Examples:
flattenfolder(); //flatten current folder
flattenfolder(,,1); //same, but without prompt
text flattenfolder(); //show return value
echo flattenfolder("E:\Test\flatten-01", "|");
Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 16:50
by Irwin of Upton
Hello highend - Thanks for pointing to "flattenfolder()". At the moment scripting is "above my pay grade". Plugging a command number into the button would have been nice but that wasn't meant to be.
Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 16:55
by admin
Don't know about your pay grade, but this does not look too hard to me:
Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 17:00
by highend
"above my pay grade"
-> No scripting^^
Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 17:16
by admin
The skill you need here is rather pasting than scripting.

Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 17:39
by highend
No, what he probably meant: No pro version = no scripting available...
Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 17:40
by admin
Oh, now I got it...

Re: Understanding "Flatten Folder"
Posted: 01 Sep 2015 19:34
by Irwin of Upton
Using a script word without having to write a script! Now I've seen everything.
Thanks fellas ...
Re: Understanding "Flatten Folder"
Posted: 02 Sep 2015 15:21
by Irwin of Upton
With the help of those above it has been possible to assemble a toolbar button to Flatten Folders.
For those who may be interested here is a link to the icon chosen to do this after an internet search. It proclaims the function nicely.
http://www.iconarchive.com/show/flat-fo ... -icon.html
Re: Understanding "Flatten Folder"
Posted: 02 Sep 2015 15:41
by admin
Cool. So you *have* the paid version with scripting?
Re: Understanding "Flatten Folder"
Posted: 02 Sep 2015 15:53
by Irwin of Upton
Yes. Being new and timid and somewhat unsure about dealing with a company in Germany my Forum name is a nom de plume to keeps things separate from the program registered name. To invoke a saying, "Just because you are paranoid doesn't mean someone isn't out to get you". Dark humor.
Re: Understanding "Flatten Folder"
Posted: 02 Sep 2015 16:31
by admin