would be nice have several settings and switch between them

Features wanted...
Post Reply
giuliastar
Posts: 365
Joined: 14 Sep 2013 07:22

would be nice have several settings and switch between them

Post by giuliastar »

Hi

would be nice have several settings for example the folder data , data1 , data2 and so on
they could contain non only the ini config file but all the preferences , so we can switch between them

for example on standard setting foder data , i could store 10 differents color labels , tags , xyplorer preferences ,catalog , toolbar icon , global filters and settings scripts and so on

i want to switch to another settings I could switch to data1 , with a restart , with all different settings above

it will make even more powerful , for every tasks , we could have every tools easy at hand

thanks

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: would be nice have several settings and switch between them

Post by highend »

Use xyplorer.exe with the /ini= switch?
One of my scripts helped you out? Please donate via Paypal

giuliastar
Posts: 365
Joined: 14 Sep 2013 07:22

Re: would be nice have several settings and switch between them

Post by giuliastar »

highend wrote: 07 Jun 2021 08:27 Use xyplorer.exe with the /ini= switch?
Hi
and does it load different data folders with all the settings stored in that folder ?
thanks

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: would be nice have several settings and switch between them

Post by highend »

Read the help file for Configuration - Command Line Switches
-> /ini
-> Setting the Application Data Path (ADP)
One of my scripts helped you out? Please donate via Paypal

giuliastar
Posts: 365
Joined: 14 Sep 2013 07:22

Re: would be nice have several settings and switch between them

Post by giuliastar »

highend wrote: 07 Jun 2021 08:50 Read the help file for Configuration - Command Line Switches
-> /ini
-> Setting the Application Data Path (ADP)
hi
i thought to a handy solotion , like a drop menu

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: would be nice have several settings and switch between them

Post by highend »

Then use a script and make sure that the data folders names begin with "XYplorer" (in %APPDATA%) or "Data" (for portable versions) and adapt the script to the root path of these data folders...

E.g. valid data folder names:

Code: Select all

C:\Users\<your user name>\AppData\Roaming\XYplorer
C:\Users\<your user name>\AppData\Roaming\XYplorer1
C:\Users\<your user name>\AppData\Roaming\XYplorer_01
...

D:\Tools\XYplorer\Data
D:\Tools\XYplorer\Data1
D:\Tools\XYplorer\Data_01
...

Code: Select all

    // Defaults for installed XY instances
    $xyDataRoot       = "%APPDATA%";
    $xyDataDirPattern = "XYplorer";

    // Defaults for portable ones
    // $xyDataRoot       = "D:\Tools\XYplorer";
    // $xyDataDirPattern = "Data";

    // Get all XY data folders
    $folders    = listfolder($xyDataRoot, , 2, <crlf>);
    $xyDataDirs = regexmatches($folders, "^.+\\" . $xyDataDirPattern . ".*?(?=\r?\n|$)", <crlf>);

    // Make sure they contain a "XYplorer.ini" file
    $finalDataDirs = "";
    foreach($xyDataDir, $xyDataDirs, <crlf>, "e") {
        if (exists("$xyDataDir\XYplorer.ini") == 1) {
            $finalDataDirs .= "$xyDataDir|$xyDataDir|*.<DIR>|<crlf>";
        }
    }
    $finalDataDirs = trim($finalDataDirs, <crlf>, "R");
    end (gettoken($finalDataDirs, "count", <crlf>) == 1), "Only a single data folder exists, no switching possible!";

    // Menu
    $sel = popupmenu($finalDataDirs, 6:=<crlf>, 7:="|");
    if ($sel) {
        run """<xy>"" /ini=""$sel\""";
        exit "n";
    }
One of my scripts helped you out? Please donate via Paypal

Post Reply