if not exist “%AppData%\Mozilla\Firefox\Profiles\user.default” xcopy /c /q /s /e /y /V “\\Server IP\share\Profil\%username%.V2\AppData\Roaming\Mozilla\Firefox\Profiles\*” “%AppData%\Mozilla\Firefox\Profiles\”
@echo off & setlocal
set “Ordner=”%UserProfile%\AppData\Roaming\Mozilla\Firefox\Profiles\”
set default=.default
set Repl=.default
pushd “%Ordner%”
for /d %%i in (*.*) do call :ProcessDir “%%i”
popd
goto :eof
:ProcessDir
set “NameAlt=%~1”
call set “NameAlt=%%NameAlt:.%default%=%Repl%%%”
for /f “delims=%Repl%” %%n in (“%NameAlt%”) do set “NameNeu=%%n”
set “NameNeu=%user:user.default %”
if not exist “%NameNeu%” ren %1 “%NameNeu%”
goto :eof
xcopy /c /q /s /e /y /V “\\Server IP\share\logon\profiles.ini” “%UserProfile%\AppData\Roaming\Mozilla\Firefox\”
REM Profile.ini
[General] StartWithLastProfile=1 [Profile0] Name=default
IsRelative=1
Path=Profiles/user.default
Default=1