VMware Horizon Community
dvdende
Enthusiast
Enthusiast

Folder exclude with exception of specific folder

Hello,

We use the import/export code below to manage our Mozilla Firefox profile.
Since updating from .88 to .92 we are seeing our 2FA cookies land in the folder "<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default".

Now I want to include specific folders from that excluded folder so saved 2FA will be remembered across sessions. Seeing I only know the specific name of the folders I want to include, I tried mentioning them before and after the exclude using includefoldertrees and IncludeIndividualFolders but the exclude seems to always get precedence over the include lines.

The only other option I can think of is to write out all possible options but that means I have to write hundreds of lines to only include the four folders I want and to exclude everything else. Isn't there another option? A negate option of MATCHALLBUT would be lovely here. Hope someone can think of a better option than excluding every number/letter for every position other than the URL I want to include.

Current code without include for specific URL to include form default folder:

[IncludeRegistryTrees]
HKCU\Software\Mozilla
HKCU\Software\mozilla.org
HKCU\Software\MozillaPlugins

[IncludeFolderTrees]
<AppData>\Mozilla\Firefox

[ExcludeFolderTrees]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\permanent
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\temporary

Thanks in advance,

Dominic

--EDIT-- I could use xcopy as a pre-export task to export the folders of the 4 URL's and then use Post-Import to put them back. But this all seems evenly excessive.

For now, until someone finds something better, I will be going the export and import task route.

Export ps1:

cd $env:APPDATA\Mozilla\Firefox\Profiles\*.default\storage\default

Copy-Item -Path *.companyName* -Destination $env:APPDATA\CompanyName\Firefox -Recurse

Import ps1:

cd $env:APPDATA\Mozilla\Firefox\Profiles\*.default\storage\default

Copy-Item -Path $env:APPDATA\CompanyName\Firefox\* . -Recurse

0 Kudos
1 Reply
dvdende
Enthusiast
Enthusiast

To give a specific example. If I want to include only a URL that starts with "bo.", I have to write the code below. And seeing I want to include 4 specific URL's this will be a disaster in terms of processing time:

<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++0[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++1[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++2[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++3[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++4[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++5[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++6[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++7[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++8[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++9[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++a[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++c[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++d[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++e[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++f[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++g[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++h[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++i[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++j[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++k[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++l[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++m[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++n[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++o[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++p[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++q[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++r[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++s[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++t[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++u[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++v[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++w[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++x[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++y[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++z[MATCHALL]

<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b0[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b1[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b2[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b3[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b4[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b5[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b6[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b7[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b8[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++b9[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++ba[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bb[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bc[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bd[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++be[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bf[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bg[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bh[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bi[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bj[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bk[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bl[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bm[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bn[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bp[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bq[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++br[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bs[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bt[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bu[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bv[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bw[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bx[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++by[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bz[MATCHALL]

<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo0[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo1[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo2[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo3[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo4[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo5[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo6[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo7[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo8[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bo9[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boa[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bob[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boc[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bod[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boe[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bof[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bog[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boh[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boi[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boj[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bok[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bol[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bom[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bon[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boo[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bop[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boq[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bor[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bos[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bot[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bou[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bov[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++bow[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++box[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boy[MATCHALL]
<AppData>\Mozilla\Firefox\Profiles\[MATCHALL]\storage\default\https+++boz[MATCHALL]

0 Kudos