Understanding "Flatten Folder"
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Understanding "Flatten Folder"
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.
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"
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
One of my scripts helped you out? Please donate via Paypal
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Understanding "Flatten Folder"
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"
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", "|");
One of my scripts helped you out? Please donate via Paypal
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Understanding "Flatten Folder"
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.
-
admin
- Site Admin
- Posts: 64916
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Understanding "Flatten Folder"
Don't know about your pay grade, but this does not look too hard to me:
- Attachments
-
- 2015-09-01_165357.png (5.14 KiB) Viewed 9823 times
FAQ | XY News RSS | XY X
Re: Understanding "Flatten Folder"
-> No scripting^^"above my pay grade"
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 64916
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Understanding "Flatten Folder"
The skill you need here is rather pasting than scripting. 
FAQ | XY News RSS | XY X
Re: Understanding "Flatten Folder"
No, what he probably meant: No pro version = no scripting available...
One of my scripts helped you out? Please donate via Paypal
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Understanding "Flatten Folder"
Using a script word without having to write a script! Now I've seen everything.
Thanks fellas ...
Thanks fellas ...
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Understanding "Flatten Folder"
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
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
-
admin
- Site Admin
- Posts: 64916
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Understanding "Flatten Folder"
Cool. So you *have* the paid version with scripting?
FAQ | XY News RSS | XY X
-
Irwin of Upton
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Understanding "Flatten Folder"
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.
XYplorer Beta Club