[wpkg-users] [OT] 'for' madness...
Marco Gaiarin
gaio at sv.lnf.it
Fri Mar 22 15:26:16 CET 2013
Mandi! Stefan Pendl
In chel di` si favelave...
> You need to use delayed variable expansion to allow assigning inside
> a bracket to work.
Thanks to all for the hints.
Semián, in private, suggested me to use pushd/popd and the use simply
the /r switch on current directory, and indeed works.
So, the correct/working loop now is:
for %%G in (%APPDATA%\Mozilla\Firefox\Profiles %APPDATA%\Thunderbird\Profiles) do (
if exist "%%G" (
pushd "%%G"
if defined CERTUTIL (
for /d %%X in ("*") do (
%CERTUTIL% -L -n %CACERTNAME% -d "%%~fX" >nul
if ERRORLEVEL 1 (
%CERTUTIL% -A -n %CACERTNAME% -t "TC,TC,TC" -i %CACERT% -d "%%~fX"
)
)
)
if defined SQLITE (
for /r %%X in ("*.sqlite") do (
%SQLITE% "%%X" VACUUM
%SQLITE% "%%X" REINDEX
)
)
popd
)
)
Again, thanks to all! ;-)
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797
Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
More information about the wpkg-users
mailing list