You need to be logged in to post in the forums. If you do not have an account, please sign up first.
A cleanup script for the masses (if using the classic installer)
Below is what I use to cleanup Opera 10.10 (installed using the classic installer) as needed:c:
cd\progra~1\opera\profile > nul
rmdir /s /q Opcache > nul
rmdir /s /q sessions > nul
rmdir /s /q cache > nul
rmdir /s /q icons > nul
rmdir /s /q widgets > nul
rmdir /s /q tempor~1 > nul
rmdir /s /q vps > nul
del /f /q download.dat > nul
del /f /q global*.dat > nul
del /f /q vlink*.* > nul
del /f /q cookies*.dat > nul
del /f /q typed*.xml > nul
del /f /q oprand.dat > nul
cd\
exit
Use at your own risk, but I've been meaning to put this up here for years. It differs for 9.x and for the non-classic installed versions of Opera 9.x to present.
Chris
****************** UPDATED DUE TO OPERA.EXE STILL BEING A RUNNING PROCESS AFTER BEING CLOSED ******************
PSKILL.EXE is a SYSTERNALS application that will need to be run once to answer "YES" to their EULA
PSKILL.EXE is a command line "kill process" utility
Below is what I use to cleanup Opera 10.X using the classic installer:
c:
PSKILL -t opera.exe
cd\progra~1\opera\profile > nul
rmdir /s /q Opcache > nul
rmdir /s /q sessions > nul
rmdir /s /q cache > nul
rmdir /s /q icons > nul
rmdir /s /q widgets > nul
rmdir /s /q tempor~1 > nul
rmdir /s /q vps > nul
del /f /q download.dat > nul
del /f /q global*.dat > nul
del /f /q vlink*.* > nul
del /f /q cookies*.dat > nul
del /f /q typed*.xml > nul
del /f /q oprand.dat > nul
cd\
exit
Use at your own risk, but I've been meaning to put this up here for years. It differs for 9.x and for the non-classic installed versions of Opera 9.x to present.
Chris
PSKILL.EXE is a SYSTERNALS application that will need to be run once to answer "YES" to their EULA
PSKILL.EXE is a command line "kill process" utility
Below is what I use to cleanup Opera 10.X using the classic installer:
c:
PSKILL -t opera.exe
cd\progra~1\opera\profile > nul
rmdir /s /q Opcache > nul
rmdir /s /q sessions > nul
rmdir /s /q cache > nul
rmdir /s /q icons > nul
rmdir /s /q widgets > nul
rmdir /s /q tempor~1 > nul
rmdir /s /q vps > nul
del /f /q download.dat > nul
del /f /q global*.dat > nul
del /f /q vlink*.* > nul
del /f /q cookies*.dat > nul
del /f /q typed*.xml > nul
del /f /q oprand.dat > nul
cd\
exit
Use at your own risk, but I've been meaning to put this up here for years. It differs for 9.x and for the non-classic installed versions of Opera 9.x to present.
Chris
19. July 2010, 19:30:19 (edited)
Opera keeps saved sessions (manually saved ones too) in the sessions folder, so I wouldn't recommend deleting it to anyone who's using that feature. Same thing might go for the widgets folder, though I'm not using widgets therefore I also delete it.
Also there's no need to use short file names instead of full ones: application_cache and temporary_downloads.
Also there's no need to use short file names instead of full ones: application_cache and temporary_downloads.
Originally posted by pdw:
Whatever are you guys talking about? What does this do? How do you do it?
This is a batch file/script that cleans up files/folders that Opera uses to store browsing information, even if you have it emptying out at closing. These files/folders get re-created when Opera starts back up. Like grrrrrr said, there are some items you may not to have removed. However, I do not use/want the files/folders and remove them. SO, use at your own risk.
Chris
P.S. If you install it with the normal installer (non-classic), the folder structure changes quite a bit for XP (unknown for any other OS).
Originally posted by pdw:
Whatever are you guys talking about? What does this do? How do you do it?
The way I use it is that I have a batch file that launches Opera, waits for it to terminate, and then removes the folders/files as per the above commands. This way the left behind cached files are removed immediately when I close Opera, and the next Opera start up will be without any delay.
In order to hide the command window either put it on minimize or use another program (such as cmdow.exe) to hide it even from the windows taskbar.
I'd really like if there was a way to configure Opera to do all this for me. Is there a setting like 'start program on Opera exit"?
I can't believe I haven't been in these forums for so long!
This thread is really old now and probably whoever wanted to solve this has already done so. Still, I'll explain what I meant.
My Opera shortcut launches this:
start_opera.bat looks like:
The utility cmdow.exe can be found here (looks like the official page): http://www.commandline.co.uk/cmdow/
What happens is that the shortcut launches cmdow.exe, cmdow.exe launches the batch file in a hidden shell window, batch file launches Opera, waits until Opera terminates, then does the cleanup. Batch file out, cmdow.exe out. The memory occupied by cmdow.exe is minimal.
Unfortunately cmdow.exe is considered a threat by some virus scanners (supposedly due to its ability to hide visible signs of its execution), so you'll need to live with that.
This thread is really old now and probably whoever wanted to solve this has already done so. Still, I'll explain what I meant.
My Opera shortcut launches this:
(path)\cmdow.exe /RUN /HID (path)\start_opera.bat
start_opera.bat looks like:
start /wait "" "C:\Program Files (x86)\Opera\opera.exe" rem sleep 1 rmdir /S /Q ... (cleanup lines)
The utility cmdow.exe can be found here (looks like the official page): http://www.commandline.co.uk/cmdow/
What happens is that the shortcut launches cmdow.exe, cmdow.exe launches the batch file in a hidden shell window, batch file launches Opera, waits until Opera terminates, then does the cleanup. Batch file out, cmdow.exe out. The memory occupied by cmdow.exe is minimal.
Unfortunately cmdow.exe is considered a threat by some virus scanners (supposedly due to its ability to hide visible signs of its execution), so you'll need to live with that.
I find cmdow.exe really useful. Many applications (wmvare, adobe cs5, etc) install services that are useless when the application is not running. I usually disable those services (and drivers if possible) only enabling them temporarily before launching the program, and then disabling them again after the application has quit. With cmdow it is easier done in an inconspicuous way.
Not being picky... but this script will not be much help for the majority of users. Opera, like all other programs, prefers to store its user settings in the %appdata%\Opera\ branch by default. It has always been a good idea to split the user data away from the program files when installing applications on any OS. (Especially if there are multiple users around)
I assume when you use the classic installer, you are changing some of the default settings at install time to get your user data forced in among the program's application files.
A more generic script would need to start with cd %appdata%\opera\profile
I assume when you use the classic installer, you are changing some of the default settings at install time to get your user data forced in among the program's application files.
A more generic script would need to start with cd %appdata%\opera\profile
Happy Opera user since v3.5x back in the previous Century
Originally posted by grrrrrr:
@grrrrrr: It looks like it's been a while since you've posted anything, but if you're still around, still using this batch file method, and wouldn't mind posting it here in the thread, I'd be interested in seeing your current batch file. (Or feel free to PM me if you don't want it posted here in the thread... ...Of course, you can leave out or change any personal info, like username in the path, etc.)The way I use it is that I have a batch file that launches Opera, waits for it to terminate, and then removes the folders/files as per the above commands. This way the left behind cached files are removed immediately when I close Opera, and the next Opera start up will be without any delay.
Thanks!
@grrrrrr:
Thanks for posting back. I didn't have any particular need for it. I was just interested in learning more about how it worked, and thought it might potentially be useful at some point.
I'm too tired to think right now, but I'll look forward to looking it over as soon as I get a chance.
Thanks again!
Thanks for posting back. I didn't have any particular need for it. I was just interested in learning more about how it worked, and thought it might potentially be useful at some point.I'm too tired to think right now, but I'll look forward to looking it over as soon as I get a chance.
Thanks again!