cleanerml icon indicating copy to clipboard operation
cleanerml copied to clipboard

Cleaner action to compress files?

Open Ytrog opened this issue 4 years ago • 4 comments

I would like for it to be possible to compress files using BleachBit either using an archiver or for example NTFS compression.

So for example:

<action command="compress" search="walk.files" path="$localappdata\temp\chocolatey\" regex="\.log$"/>

Ytrog avatar May 16 '21 08:05 Ytrog

You can try this with BleachBit's command="process" and Microsoft's compact command. Does this help?

az0 avatar May 16 '21 21:05 az0

You can try this with BleachBit's command="process" and Microsoft's compact command. Does this help?

Will try 😀

Ytrog avatar May 26 '21 22:05 Ytrog

This works @az0:

<?xml version="1.0" encoding="UTF-8"?>
<!--
    BleachBit
    Copyright (C) 2015 Andrew Ziem
    https://www.bleachbit.org
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    @app     Chocolatey
    @link    https://chocolatey.org/
    @os      Windows
    @version 0.1.0
-->
<cleaner id="compact" os="windows">
  <label>Compact</label>
  <description>Compact test</description>
  <option id="test">
    <label>Test</label>
    <description>Compress test files using compact</description>
    <action command="process" cmd="compact /s /c c:\test\compact\*.*"/>
  </option>
</cleaner>

However I have a few comments: At the CleanerML documentation the process action is mentioned, however that it needs an cmd="" attribute is not. I found an example in the Windows Update cleaner otherwise I could not have done this.

What also would be nice to know is how the search options work with this action. How are the results passed to the cmd="" attribute? 😀

Ytrog avatar May 27 '21 10:05 Ytrog

@az0 could the cmd="" thingy I mentioned above be added to the documentation? 🙃

Ytrog avatar Jul 13 '21 19:07 Ytrog