Click here for important information about

Find Firefox Profile name

Toshiba Satellite l505d-s5965 notebook
May 1, 2010 at 23:18:42
Specs: Windows 7, 1024
for those who use firefox, the profile is generated by FF at first run.

is there a way in batch to determine the profile name and place it in a variable?

for XP and Vista

thank you

See More: Find Firefox Profile name

May 1, 2010 at 23:32:01
I can't test vista, but perhaps:

for /d %%a in ("%appdata%\Mozilla\Firefox\Profiles\*") do echo %%a

I'm not sure if there could be multiple profiles or not...

Report •

May 2, 2010 at 00:07:56
thats works on vista and 7

how would instead of echo the full path like the code does can i get the 'profile'.default in a variable?

thanks, nice work !

Report •

May 2, 2010 at 00:10:42
... do set var=%~nxa

Report •

Related Solutions

May 2, 2010 at 00:19:16
for some reason it fail when i replace the do part of the FOR

it wouldnt echo %var%

the batch just close cant see the error even with pause


Report •

May 2, 2010 at 00:33:49
My bad:

... do set var=%%~nxa

Report •

May 2, 2010 at 00:37:07
thank judago! worked out

Report •

May 2, 2010 at 00:41:37

test this on XP if you would please

for /d %%a in ("%userprofile%\AppData\Roaming\Mozilla\Firefox\Profiles\*") do set var=%%~nxa


Report •

May 2, 2010 at 00:49:23
No go for me on xp, I couldn't even find a directory called "roaming" anywhere on c:\ (where firefox 3.6.3 is installed and all user directories are).

Report •

May 2, 2010 at 00:57:42
would you do me a favorite, FF stores cookies and history in files. find the path to these file and post them for me if you can.

the files are


those if added to the code you gave me can delete the history out of FF using the command line.

thank you

Report •

May 2, 2010 at 01:09:13
In xp those files are directly below the profile folder:

dir /s/b/a c:\cookies.sqlite c:\formhistory.sqlite c:\places.sqlite
c:\Documents and Settings\judago\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\cookies.sqlite
c:\Documents and Settings\judago\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\formhistory.sqlite
c:\Documents and Settings\judago\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\places.sqlite

Report •

May 2, 2010 at 18:38:46
For the record:
for /f "tokens=2 delims==" %%a in ('find /i "path=" "%appdata%\mozilla\firefox\profiles.ini"') do set p=%%a
set p=%appdata%\mozilla\firefox\%p%
@echo %p%

Report •

Ask Question