Deleting Empty Folders Bug [winapp2.ini]

I sent a bug report email about this, but no one responded. I have two bug report.

BUG REPORT 1

------------------------------</strong>


<strong>win2app.ini</strong> file has <strong>"REMOVESELF"</strong> tags and <strong>CCleaner doesn't show deleted folders in advanced report page.</strong>


"The REMOVESELF flag will do the same as RECURSE, but also remove any empty directories."

BUG REPORT 2

------------------------------</strong>


<strong>1-</strong> Browse this folder: %APPDATA%\Discord\Cache


<strong>2-</strong> Delete inside, make this folder empty (%APPDATA%\Discord\Cache)


<strong>3-</strong> Open CCleaner and use win2app.ini


<strong>4- </strong>Add Exclude Rule: "%APPDATA%\Discord\Code Cache\*.*"


<strong>5-</strong> Use this -&gt; Clean Discord*


<strong>6- </strong>You will see "%APPDATA%\Discord\Cache" folder not available

The rule does not prevent the folder from being deleted.

Winapp2 (the proper name) is not suoported outside the winapp2 topic.

Though bug report one should get some developer attention if they note it.

That isn't going to work with the quotes around the command:

4- Add Exclude Rule: "%APPDATA%\Discord\Code Cache\*.*"

See if these work:

4- Add Exclude Rule: %APPDATA%\Discord\Code Cache\*.*


4- Add Exclude Rule: %APPDATA%\Discord\Code Cache\|*.*||0|0|24

1 hour ago, Andavari said:
<div class="ipsQuote_contents">
	<p>
		 
	</p>

	<p>
		That isn't going to work with the quotes around the command:


		4- Add Exclude Rule: "%APPDATA%\Discord\Code Cache\*.*"
	</p>

	<p>
		See if these work:


		4- Add Exclude Rule: %APPDATA%\Discord\Code Cache\*.*


		4- Add Exclude Rule: %APPDATA%\Discord\Code Cache\|*.*||0|0|24
	</p>

	<p>
		 
	</p>
</div>

Not work! You can see, I already add this lines in ccleaner.ini

image.png.2e5f21bc58133b088c5ca89af4c2d6ce.png

Cache folder = if EMPTY it gets deleted. And you can't see this folder deleted in Advanced Reports page. There is 2 bugs as you can see.

<strong style="background-color:#ffffff;color:#382e23;font-size:14px;">4-<span> </span></strong><span style="background-color:#ffffff;color:#382e23;font-size:14px;">Add Exclude Rule: %APPDATA%\Discord\<strong>Cache</strong>\|*.*||0|0|24 (I misspell in first message)</span>

As far as I can remember, this behavior has always been like this. If a folder is empty (and no longer contains any files), it is always deleted by REMOVESELF. The exclude rule only protects the contents of a folder, but not the folder itself.

However, deleting an empty folder should not be a problem in most cases. But if it is, the FileKeys of the Winapp2.ini entry must be adjusted accordingly. It is therefore not really a bug, but rather an overly "aggressive" FileKey.

Hi all,

I've changed the title of this thread to reflect that it's about winapp2 and not the main CCleaner.

(I didn't merge it into the main winapp2 thread because it would have become fragmented).

3 hours ago, APMichael said:
<div class="ipsQuote_contents">
	<p>
		As far as I can remember, this behavior has always been like this. If a folder is empty (and no longer contains any files), it is always deleted by REMOVESELF. The exclude rule only protects the contents of a folder, but not the folder itself.
	</p>

	<p>
		However, deleting an empty folder should not be a problem in most cases. But if it is, the FileKeys of the Winapp2.ini entry must be adjusted accordingly. It is therefore not really a bug, but rather an overly "aggressive" FileKey.
	</p>

	<p>
		 
	</p>
</div>

I want to prevent it from being deleted because I use a symbolic link. I use Cache Relocator + RAMDisk for Chrome, Discord Caches (Protecting SSD). CCleaner sees this folders an empty and deleting them.

Quote
<div class="ipsQuote_contents">
	<p>
		The exclude rule only protects the contents of a folder, but not the folder itself.
	</p>
</div>

We should have option to prevent deleting if REMOVESELF used in winapp2.ini file.

Also you ignoring other bug it is deleting empty folders and not showing advanced reports page. It is important when u use folders like this;

<img class="ipsImage ipsImage_thumbnailed" data-fileid="18636" data-ratio="36.83" width="695" alt="image.png.53852a7897a44bdcd4355a5fb637206b.png" src="<fileStore.core_Attachment>/monthly_2024_03/image.png.53852a7897a44bdcd4355a5fb637206b.png" />

Piriform only supports the cleanup rules built into CCleaner. The Winapp2.ini is only a tolerated extension of CCleaner users.

If you deviate from a standard system and redirect folders, it is questionable whether Piriform will correct this. You will probably have no choice but to use your own Winapp2.ini in which you rewrite the problematic cleanup rules.

Correct, CCleaner does not show deleted folders, it never has. Obviously, users are not interested enough. But there have been one or two requests for it here. But Piriform has not yet implemented it. You can possibly make a post in the "CCleaner Suggestions" forum.

Thanks for clarify, I don't think they will implement it. From what I see, they are currently focusing on creating an All-in-One tool.

I would rather research a better removal tool rather than editing winapp2.ini for every update to fix the problems.

Have a nice day.

A possible workaround is to create a "protection" file in that folder location, it could be named anything such as DoNotDelete.txt, ProtectedFolder.txt, and then type in an brief description so you know why it's there in the future, i.e.; Protects this folder from being deleted by 3rd party cleaning tools.

Then set the file attribute to read-only (and possibly also set it to hidden and system). Then input the file as an exclusion in CCleaner in 'Options > Exclude' to prevent the whole folder from being deleted, and the added benefit is you may not have to mess around with editing winapp2.ini files to fix CCleaners behaviour. I personally do this in some folders that I want it to clean, but where the folder must remain intact, i.e.; for audio and video encoding, etc., that programs expect to always exist.