Manual sort

My default screen is dual lister, on one side I have my "go to folder" on the other I have all my drives in tile view., which is how I like things, is it possible to manually sort the drives in tile mode. Thanks.

Manual sort is possible in normal directories, but not in This PC where all the drives are listed. (At least, not without adding a special script column that you sort by. That could sort things in any order it wanted.)

That sounds a bit complicated, could you give me a few clues I'm afraid I'm not very confident with scripts. If it's to much trouble I'll leave things as they are, it's only cosmetic. Thanks for the quick reply.

You could create a folder, drag all the drives you need into it as symbolic links and turn on manual sort, like so:

1 Like

Thanks for your advice, unfortunately I lose the information that's normally shown with the drives, size and free space, never the less it does work .

Ah, yes, true. Then the custom column makes more sense. Here's a quick solution. Simply change sortValue in the script until the drives are in the order you like.

function OnInit(initData) {
    initData.name = 'CustomDriveSort';
    initData.version = '2022-04-21';
    initData.copyright = '';
    initData.url = 'https://resource.dopus.com/t/manual-sort/41093';
    initData.desc = 'Custom Drive Number for manual sorting';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'CustomDriveSort';
    col.header = 'CDS';
    col.method = 'OnColumn';
}

function OnColumn(scriptColData) {
    var itemDrive = scriptColData.item.path.drive;
    var sortValue;

    if (itemDrive == 0) {
        sortValue = 100;
    } else if (itemDrive == 1) {
        sortValue = 101;
    } else if (itemDrive == 2) {
        sortValue = 102;
    } else if (itemDrive == 3) {
        sortValue = 103;
    } else if (itemDrive == 4) {
        sortValue = 104;
    } else if (itemDrive == 5) {
        sortValue = 105;
    } else if (itemDrive == 6) {
        sortValue = 106;
    } else if (itemDrive == 7) {
        sortValue = 108;
    } else if (itemDrive == 8) {
        sortValue = 108;
    } else if (itemDrive == 9) {
        sortValue = 109;
    } else if (itemDrive == 10) {
        sortValue = 110;
    } else if (itemDrive == 11) {
        sortValue = 111;
    } else if (itemDrive == 12) {
        sortValue = 112;
    } else if (itemDrive == 13) {
        sortValue = 113;
    } else if (itemDrive == 14) {
        sortValue = 114;
    } else if (itemDrive == 15) {
        sortValue = 115;
    } else sortValue = itemDrive;

    scriptColData.value = sortValue;
}

ColumnCustomDriveSort.js.txt (1.6 KB)


2 Likes

Thanks for your help, I finally got it to work, the problem is I have no idea how. I just kept rearranging the sort value until I had everything where I wanted, just wish I knew how. only took me half the day.
Just keep in mind when I went to school, the high light was filling the ink wells and passing round the abacas.