Page 1 of 1
would be nice have several settings and switch between them
Posted: 07 Jun 2021 08:08
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
Re: would be nice have several settings and switch between them
Posted: 07 Jun 2021 08:27
by highend
Use xyplorer.exe with the /ini= switch?
Re: would be nice have several settings and switch between them
Posted: 07 Jun 2021 08:33
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
Re: would be nice have several settings and switch between them
Posted: 07 Jun 2021 08:50
by highend
Read the help file for Configuration - Command Line Switches
-> /ini
-> Setting the Application Data Path (ADP)
Re: would be nice have several settings and switch between them
Posted: 07 Jun 2021 19:47
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
Re: would be nice have several settings and switch between them
Posted: 07 Jun 2021 21:29
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";
}