Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I retrieve the current profile path & name from a command line?

  • 6 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 519 views
  • Last reply by FredMcD

I'm trying to create a DOS batch file to clear the current profile's cache (web site data only, not cookies). I have it working fine using a hard-coded path of the existing profile (I only have one profile), but I'd like it to remain viable in case a newer profile is created for whatever reason. Is there a way to retrieve the path into a variable?

Thank you!

I'm trying to create a DOS batch file to clear the current profile's cache (web site data only, not cookies). I have it working fine using a hard-coded path of the existing profile (I only have one profile), but I'd like it to remain viable in case a newer profile is created for whatever reason. Is there a way to retrieve the path into a variable? Thank you!

தீர்வு தேர்ந்தெடுக்கப்பட்டது

I don't think there is such an option: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

Sorry, this link no longer in use.


We do not recommend using other programs to clean Firefox because they could corrupt the files. Also, the browser can clean itself.


Type about:preferences#privacy<enter> in the address box. The button next to History, select Use Custom Settings.

Turn off Always Use Private Browsing Mode Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on ONLY Cache and Form And Search History leaving the others off.

Read this answer in context 👍 1

All Replies (6)

type about:profiles in the firefox address bar and hit enter

தீர்வு தேர்ந்தெடுக்கப்பட்டது

I don't think there is such an option: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

Sorry, this link no longer in use.


We do not recommend using other programs to clean Firefox because they could corrupt the files. Also, the browser can clean itself.


Type about:preferences#privacy<enter> in the address box. The button next to History, select Use Custom Settings.

Turn off Always Use Private Browsing Mode Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on ONLY Cache and Form And Search History leaving the others off.

FredMcD மூலமாக திருத்தப்பட்டது

Once upon a time I wrote a VBScript to parse the installs.ini file for default profile paths and build a session history file backup script. I'm not sure it works in 2022, but if you want to take a look for inspiration:

https://gist.github.com/jscher2000/9bb73efe9046bcdbb1c8a31f78386d21

jscher2000 said

Once upon a time I wrote a VBScript...

Thank you! I'll look into this for sure.


FredMcD said

We do not recommend using other programs to clean Firefox because they could corrupt the files. Also, the browser can clean itself. Type about:preferences#privacy<enter> in the address box. The button next to History, select Use Custom Settings. Turn off Always Use Private Browsing Mode Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on ONLY Cache and Form And Search History leaving the others off.

Thank you for this - I wasn't pursuing a solution within FF because I only knew of the option to clear BOTH cache and cookies when FF exits. This looks like a great way to do what I want. (I will say, it seems to me that the option in Settings should allow selection of cookies separately from cache, just like it does in the nearby "Clear Data" function.)

I appreciate the help!

mike.fairleigh மூலமாக திருத்தப்பட்டது

FredMcD said

Type about:preferences#privacy<enter> in the address box. The button next to History, select Use Custom Settings. Turn off Always Use Private Browsing Mode Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on ONLY Cache and Form And Search History leaving the others off.

This is the way. And now I understand what I was missing all along. Thank you!

Glad to help. Safe Surfing.