<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Folder Sizes on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/folder-sizes/</link>
        <description>Recent content in Folder Sizes on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/folder-sizes/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Show Folder Sizes in Finder: Enable Calculate All Sizes Across Existing Views</title>
            <link>https://jingyuan-zheng.github.io/p/finder-folder-sizes/</link>
            <pubDate>Sun, 09 Aug 2026 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/finder-folder-sizes/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/finder-folder-sizes/featured.png&#34; alt=&#34;Featured image of post Show Folder Sizes in Finder: Enable Calculate All Sizes Across Existing Views&#34; /&gt;&lt;p&gt;Finder Folder Sizes is a macOS command-line tool that enables Finder&amp;rsquo;s Calculate all sizes option in existing list-view settings across a folder tree.&lt;/p&gt;&#xA;&lt;p&gt;A folder can contain gigabytes while Finder&amp;rsquo;s Size column shows a dash. For a single folder, start with Finder&amp;rsquo;s own View Options: switch to list view, press &lt;strong&gt;⌘J&lt;/strong&gt;, and enable &lt;strong&gt;Calculate all sizes&lt;/strong&gt;. Imagine an archive drive with folders for 2023, 2024, and 2025, each containing more photo and document folders. Opening each one and pressing ⌘J is tedious. The tool is useful when those folders already have saved Finder list views that can be updated together.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/finder-folder-sizes&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Finder Folder Sizes&lt;/a&gt; provides the &lt;code&gt;finder-sizes&lt;/code&gt; command and an optional Finder Quick Action for that narrower job.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-the-script-changes&#34;&gt;What the script changes&#xA;&lt;/h2&gt;&lt;p&gt;Finder stores view preferences in &lt;code&gt;.DS_Store&lt;/code&gt;. A folder&amp;rsquo;s own settings can be recorded in its parent&amp;rsquo;s file, so changing only the &lt;code&gt;.DS_Store&lt;/code&gt; inside the selected folder can miss the relevant record.&lt;/p&gt;&#xA;&lt;p&gt;The tool checks the parent record and existing records below the target. It enables &lt;code&gt;calculateAllSizes&lt;/code&gt; without changing sorting, grouping, column widths, or icon sizes. It does not create a new &lt;code&gt;.DS_Store&lt;/code&gt; or a missing list-view record.&lt;/p&gt;&#xA;&lt;p&gt;That last detail explains an important limit: this is not a way to force every possible folder to display sizes. A folder without a saved applicable view can remain unchanged. Size calculation itself is still Finder&amp;rsquo;s work and may take time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-in-a-python-virtual-environment&#34;&gt;Install in a Python virtual environment&#xA;&lt;/h2&gt;&lt;p&gt;The project requires macOS, Python 3.10 or later, and &lt;code&gt;ds-store&lt;/code&gt; 1.3.3. A virtual environment avoids changing the system Python environment:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/Jingyuan-Zheng/finder-folder-sizes.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; finder-folder-sizes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python3 -m venv .venv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; .venv/bin/activate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python -m pip install -r requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Use the activated environment when running the source command. The repository also documents installing &lt;code&gt;finder-sizes&lt;/code&gt; into &lt;code&gt;~/.local/bin&lt;/code&gt;; if you choose that approach, its Python interpreter must still be able to import &lt;code&gt;ds_store&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-on-a-folder-you-have-chosen&#34;&gt;Run on a folder you have chosen&#xA;&lt;/h2&gt;&lt;p&gt;From the project directory, supply the target through a change of working directory:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;tool_path&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PWD&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/finder-sizes&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/your/archive/folder&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$tool_path&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Keep the virtual environment active and replace the example path. Before writing, the command asks for confirmation.&lt;/p&gt;&#xA;&lt;p&gt;The operation closes affected Finder windows so cached preferences can be flushed. If records change, it restarts Finder and checks whether the changes persisted. Finish Finder copying or moving operations before accepting that prompt.&lt;/p&gt;&#xA;&lt;p&gt;Back in Finder, the Size column may still show &lt;code&gt;--&lt;/code&gt; while Finder calculates, especially on an external drive or a large folder. If the report says zero records changed, check whether the setting was already on or whether the target folders have saved list-view settings at all.&lt;/p&gt;&#xA;&lt;h2 id=&#34;verify-one-small-folder-first&#34;&gt;Verify one small folder first&#xA;&lt;/h2&gt;&lt;p&gt;Choose an archive folder you already open in Finder’s list view, with a manageable set of subfolders. Finish file transfers before running the command. The warning’s &lt;strong&gt;Target&lt;/strong&gt; should match your intended folder. If it does not, press Return to cancel and check where &lt;code&gt;cd&lt;/code&gt; took you. The command uses Terminal’s current directory, not the frontmost Finder window.&lt;/p&gt;&#xA;&lt;p&gt;Read the report as several different counts. Scanned directories describe the traversal. Existing list-view settings describe eligible records. Updated records describe settings that actually changed. Many scanned folders and few updates can be a perfectly reasonable result; rerunning does not make missing settings eligible.&lt;/p&gt;&#xA;&lt;p&gt;Open the target and a couple of familiar subfolders in Finder, switch to list view, and inspect Size. Give Finder time to replace dashes with values. If one folder stays unchanged, open View Options with ⌘J and inspect its setting. New folders and folders without saved view records may still need an initial manual setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-terminal-works-but-the-quick-action-fails&#34;&gt;When Terminal works but the Quick Action fails&#xA;&lt;/h2&gt;&lt;p&gt;Finder and Terminal can launch programs with different environments. Activating &lt;code&gt;.venv&lt;/code&gt; changes that terminal session; it does not tell Finder where to find the same Python. A successful import in Terminal verifies only that entry point.&lt;/p&gt;&#xA;&lt;p&gt;Before installing the Quick Action, put the command in &lt;code&gt;~/.local/bin&lt;/code&gt; as documented and ensure the workflow can locate a Python interpreter that imports &lt;code&gt;ds_store&lt;/code&gt;. A missing-command message concerns the command’s location. A missing-module message concerns the interpreter and its dependencies. Trace those separately rather than installing packages into several unrelated environments.&lt;/p&gt;&#xA;&lt;p&gt;If the action is absent from the menu, confirm the workflow is installed, then quit and reopen Finder as the README suggests. Start with one selected folder. With files selected, their parent folders become targets, and multiple selections are deduplicated. Read the confirmation’s directory list to understand the actual scope.&lt;/p&gt;&#xA;&lt;h2 id=&#34;finder-still-has-to-calculate-the-sizes&#34;&gt;Finder still has to calculate the sizes&#xA;&lt;/h2&gt;&lt;p&gt;Enabling the setting does not create a permanent capacity inventory. Finder must inspect folder contents, which can take time on large external archives. Opening many such folders can keep it busy for a while. Wait for calculation rather than repeatedly running a script that changes the display preference.&lt;/p&gt;&#xA;&lt;p&gt;A large result is a reason to inspect a folder, not a deletion recommendation. The utility does not find duplicates or decide which photographs matter. It makes capacity easier to see so you can investigate the files with the right tools.&lt;/p&gt;&#xA;&lt;p&gt;You can later remove just the Quick Action while retaining the command, or uninstall the command using the README. Uninstalling does not automatically switch off preferences already enabled in Finder. Change an individual folder’s View Options when you want a different display style; installation and folder preferences are separate choices.&lt;/p&gt;&#xA;&lt;h2 id=&#34;optional-finder-access&#34;&gt;Optional Finder access&#xA;&lt;/h2&gt;&lt;p&gt;The repository includes &lt;code&gt;install-quick-action.sh&lt;/code&gt; for Finder access. First install &lt;code&gt;finder-sizes&lt;/code&gt; into &lt;code&gt;~/.local/bin&lt;/code&gt; as the README describes, and make sure the Python interpreter used by the Quick Action can import &lt;code&gt;ds_store&lt;/code&gt;. Then run &lt;code&gt;./install-quick-action.sh&lt;/code&gt; from the repository. Activating a virtual environment in one Terminal window does not necessarily make it available to Finder.&lt;/p&gt;&#xA;&lt;p&gt;The Quick Action processes a selected folder, or a selected file&amp;rsquo;s parent folder, and deduplicates overlapping target selections. It still asks before proceeding. This changes view preferences rather than calculating and storing a separate permanent inventory of folder sizes.&lt;/p&gt;&#xA;&lt;p&gt;For finding files across directories, see &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/machunt-native-file-search/&#34; &gt;MacHunt&lt;/a&gt;. For this tool&amp;rsquo;s precise record-handling behaviour and removal instructions, use the &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/finder-folder-sizes#readme&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;project README&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
