^ Flat View Sample?
Posted: 01 Dec 2011 02:39
Would appreciate a sample script call using the "Flat View" mode. I'm currently using "folderreport" and I'm sure I'm on the wrong track.
Thanks!
Thanks!
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Code: Select all
goto "? /:flat";Code: Select all
#311; //View | Tab | Views | Flat ViewCode: Select all
//<curpath> == "F:\XY.Test\Test\PDF\v3"
$FileList = folderreport("items", "r", "<curpath>", "r", , "|");Code: Select all
F:\XY.Test\Test\PDF\v3 <DIR>
F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03) <DIR>
F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03)\Install.exe
F:\XY.Test\Test\PDF\v3\v3.20 (2005-11-05) <DIR>
F:\XY.Test\Test\PDF\v3\v3.20 (2005-11-05)\Install.exe
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10) <DIR>
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10)\Install.exeCode: Select all
F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03)\Install.exe
F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03) <DIR>
F:\XY.Test\Test\PDF\v3\v3.20 (2005-11-05)\Install.exe
F:\XY.Test\Test\PDF\v3\v3.20 (2005-11-05) <DIR>
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10)\Install.exe
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10) <DIR>
F:\XY.Test\Test\PDF\v3 <DIR>Code: Select all
goto "E:\Test\a\? /:flat";I'm getting some odd effects, but I'll discuss that later.admin wrote:This will give you the idea:Code: Select all
goto "E:\Test\a\? /:flat";
Thanks!Zardoz2293 wrote:Default: Order By FOLDERS, FILERequired/Needed: Order By FILES, FOLDERSCode: Select all
F:\XY.Test\Test\PDF\v3 <DIR> F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03) <DIR> F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03)\Install.exeCode: Select all
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10)\Install.exe F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10) <DIR> F:\XY.Test\Test\PDF\v3 <DIR>
Closest you can get is:Zardoz2293 wrote:I'm getting some odd effects, but I'll discuss that later.admin wrote:This will give you the idea:Code: Select all
goto "E:\Test\a\? /:flat";
Is there any native scripting method to "Order By FILES, FOLDERS" rather than the default "Order By FOLDERS, FILES"?
Thanks!Zardoz2293 wrote:Default:Required:Code: Select all
F:\XY.Test\Test\PDF\v3 F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03) F:\XY.Test\Test\PDF\v3\v3.10 (2005-10-03)\Install.exeCode: Select all
F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10)\Install.exe F:\XY.Test\Test\PDF\v3\v3.64 (2010-12-10) F:\XY.Test\Test\PDF\v3
So it can't be done in scripting?serendipity wrote:Closest you can get is:
Config>General>Sorting> and uncheck Keep folders on top. Then sort descending.
AFAIK, no.Zardoz2293 wrote:So it can't be done in scripting?serendipity wrote:Closest you can get is:
Config>General>Sorting> and uncheck Keep folders on top. Then sort descending.
My comment here is not related to this topic, but thanks for the location of the "Keep folders on top" information -- I've been looking for it but wasn't sure of the name or where to find. Thanks!serendipity wrote:Config>General>Sorting> and uncheck Keep folders on top. Then sort descending.
AFAIK the above has no effect on the order of the folders and files in a Branch View.serendipity wrote:Closest you can get is:
Config>General>Sorting> and uncheck Keep folders on top. Then sort descending.
I haven't got the hang of the whole command ID thing, so I don't understand the impact of what this means.nas8e9 wrote:@Zardoz2293: Don was asking for command ID's to be added today, in this thread.
From the help file:Zardoz2293 wrote:I haven't got the hang of the whole command ID thing, so I don't understand the impact of what this means.nas8e9 wrote:@Zardoz2293: Don was asking for command ID's to be added today, in this thread.
However, I was barking up the wrong tree: XYplorer's scripting has a setting command:Scripting by Numbers
In XYplorer almost every function has a fixed number, the function ID, by which it can be referred to in a script. ID #1026 happens to refer to "Miscellaneous / Find Files / Open Find Files and Reset". Open the Customize Keyboard Shortcuts dialog (menu Tools) and find this function in category Miscellaneous. At the bottom of the dialog you'll see a button showing the function's ID. Clicking this button will copy the function's ID to the clipboard, making it easy to use it in a script.
You can execute almost any function in XY in a script by referring to its function ID. E.g. #230 will pop up the submenu "New" of menu Edit.
... meaning adding the following to your script:setting
Alter some of XYplorer's user settings, temporarily or permanently. Typically used in order to ensure the expected execution of a script, which might depend on certain settings.
Syntax
setting name, [value (1|0|r)], [permanent (p)]
name
[Required] One of the following (case insensitive):
...
SortFoldersApart: Sort folders apart
Code: Select all
setting SortFoldersApart, 0;Code: Select all
setting SortFoldersApart, 0;