如何在 Windows 7 中更改文件夹颜色?

如何在 Windows 7 中更改文件夹颜色?

我的 Python 目录中有大量文件夹,我想将几​​个文件夹的颜色更改为红色。无需安装其他软件就可以做到这一点吗?

答案1

Windows 中的默认图标集有点有限,但你可以从互联网上获取免费图标。我使用了图标查找器。我下载了这个红色文件夹作为实验:

图标

您需要ico从该网站下载文件。我建议将它们保存在远离您正在编辑的文件夹的目录中。

右键单击要自定义的文件夹并选择属性,然后单击“自定义”选项卡。

文件夹属性

单击“更改图标”,然后您可以浏览默认图标窗口,或者单击“浏览”并导航到您下载的图标并选择您想要的图标。

图标选择器对话框

然后单击“确定”,并在属性对话框中单击“应用”。您的文件夹现在将更改为您选择的文件夹。

带有红色图标的文件夹

如果找不到喜欢的图标,您可以在 Paint 中制作自己的图标并将其保存为 64x64 gif,然后将后缀更改为ico

如果您想改回默认图标,您可以转到图标选择器对话框(第二张图片)并单击“恢复默认值”。这将使文件夹恢复为 Windows 默认文件夹图标。

答案2

您可以使用 PowerShell!我编写了这个脚本,它可以生成您指定颜色的图标并将其设置为给定文件夹的图标:

Add-Type -AssemblyName System.Drawing
$folderPng = 'iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAZbElEQVR4Xu1dabBVZXYVacEx3dKm1cQBW9ofKW2TdOxq5xkcEXBEcABnkMc8iCCDFA5RFLVES0VLUkpRaJKqWGIlrTbmT0AokCJaFI2WbZQy+nBMSd8pe52669Zi9z7nDu++RyqcXbXq+/bea+/9nbO/d+507n175ZJLLrnkkksuueSSSy655JJLLrnkkksuueSSSy655JJLLrnkkksuueSSSy655JJLLrnkkksuueSSSy57tlQqlV6G3oYf9QBQp1e1dC67W6wZe1enPSq7q24uImyCjfu+//77V7733ntzuhuog3paP5fdIDz5W7duPenZZ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dedxq3HvAgAETUNQef5IfJeaPFfEHi3ROKCdCGi8r3vs8Ly3Oox6PdQi1KQ+X6DSf2tP85OgYIfKZrYiHgGOPPXYCemT4sWFfwz5VvenNgAAE9t1nn30O6tu375/vt99+R++///5/deCBB5540kknrcKzT3t5U7KXIDVEehqU57mqRz5FZFebjoqInwblNJJLR7WrLdLT5mk6RnuVUMSrA+vJGwcccMDfGk7Yd999f96nT59DrXfYCPsZ8Efc1HMCkPexJAf07t37EBv7W+P/5uCDD77g0EMPvfGII46464QTTtiIT5/w2QDeHcS7UB7wRTpjAM9RqA/ziOvtupas/J6nvrQYgn5fWxHZfR0iyqNc9XseenD88cd/cNRRR917+OGH39avX7/B1qtf2yYYUN0EB1kvcQVv6kpQuwIYDkIiuwIcZxvgN7YBhlqx8bYJ/t7Glcccc8wbRx99dIL+/fuH8yyk8WjH6POmxUTI4tKnI6E8hfp1jvOQFhfxI3i/50axRx555D9bL56wccZhhx12jW2AM3Cltsbj62E/MeChAFeAph8GIAhKrgYGXEpwSfnZ3nvvfaRtimOtyC9y7H5YLwZYT46y3uC/hOEHIvEbgX0MLT3+NyJI2mvOnDl8tpljN8H1IJdccskll1xyySWXXHLJJZdccskll1xyySWXXHLJJZdcKHvt9b9KERyVI6hToQAAAABJRU5ErkJggg=='
$ms = New-Object System.IO.MemoryStream ([Convert]::FromBase64String($folderPng), $false)
$grayFolder = [System.Drawing.Image]::FromStream($ms)
$colorFolder = New-Object System.Drawing.Bitmap ($grayFolder.Width, $grayFolder.Height)
# Recolor the image
$desiredColor = [System.Drawing.Color]::FromArgb($args[0], $args[1], $args[2])
For ($y = 0; $y -lt $grayFolder.Height; $y++) {
    For ($x = 0; $x -lt $grayFolder.Width; $x++) {
        $color = $grayFolder.GetPixel($x, $y)
        $r = $color.R + (1 - $color.R / 255) * $desiredColor.R
        $g = $color.G + (1 - $color.G / 255) * $desiredColor.G
        $b = $color.B + (1 - $color.B / 255) * $desiredColor.B
        $colorFolder.SetPixel($x, $y, [System.Drawing.Color]::FromArgb($color.A, $r, $g, $b))
    }
}
$colorFolder.MakeTransparent()
$iconPath = Join-Path $args[3] 'foldericon.ico'
# Generate an ICO from the image
$file = New-Object System.IO.FileStream ($iconPath, 'Create')
$bw = New-Object System.IO.BinaryWriter $file
$bw.Write([int16]0)
$bw.Write([int16]1)
$bw.Write([int16]1)
$bw.Write([byte]($colorFolder.Width))
$bw.Write([byte]($colorFolder.Height))
$bw.Write([byte]0)
$bw.Write([byte]0)
$bw.Write([int16]0)
$bw.Write([int16]0)
$lenPosition = $file.Position
$bw.Write([int]0)
$start = $file.Position + 4
$bw.Write([int]$start)
$colorFolder.Save($file, [System.Drawing.Imaging.ImageFormat]::Png)
$imgSize = $file.Position - $start
$file.Seek([int]$lenPosition, 'Begin')
$bw.Write([int]$imgSize)
# Finish up
($file, $bw, $grayFolder, $colorFolder, $ms) | % {$_.Dispose()}
$desktopPath = Join-Path $args[3] 'desktop.ini'
[IO.File]::WriteAllText($desktopPath, "[.ShellClassInfo]`r`nIconResource=$iconPath,0`r`n[ViewState]`r`nMode=`r`nVid=`r`nFolderType=Generic")
(gi $desktopPath).Attributes = 'Hidden, System'
(gi $iconPath).Attributes = 'Hidden'
(gi $args[3]).Attributes = 'ReadOnly'

第二行是灰度版本的Base64编码这个图片来自 Burgi 的回答。脚本使用以下方法重新着色图像这个算法,然后使用此代码。最后,它将该 ICO 保存到文件夹中,写入适当的desktop.ini,将这些文件设置为隐藏,这样它们就不会妨碍您,并将文件夹标记为只读(这是让 Explorer 知道要查找的标志desktop.ini)。

要运行它,首先按照启用脚本部分中的说明进行操作PowerShell 标签 wiki。将该脚本另存为 PS1 文件,例如foldercolor.ps1。然后您可以在 PowerShell 提示符中运行它。前三个参数是颜色的红色、绿色和蓝色值;第四个参数是目标文件夹。

.\foldercolor.ps1 200 40 100 'C:\Users\Ben\test\fancy folder'

目录会显示一个漂亮的粉色文件夹图标。Explorer 可能需要一段时间才能更新,但它肯定会在登录/注销循环后显示。

注意:PowerShell 可能会打印有关方法调用失败的错误,但这不是致命的。出于某种原因,BinaryWriter在 Windows 7 上不会处理,但在 Windows 10 上会处理。如果要删除错误,只需删除以 结尾的行{$_.Dispose()}。会有内存泄漏,但这并不重要,因为您可能无论如何都会关闭 PowerShell。

答案3

更改文件夹的图标:

  1. 右键单击该文件夹,然后单击“属性”。
  2. 选择自定义选项卡。
  3. 单击更改图标...按钮。
  4. 选择现有图标或浏览以查找其他文件。
  5. 单击两次“确定”进行确认。

注意:虽然您无法具体更改颜色,但您可以在线找到彩色文件夹图标或创建自己的图标。

更改文件夹图标中文件的图标:

  1. 右键单击该文件夹,然后单击“属性”。
  2. 选择自定义选项卡。
  3. 单击选择文件...按钮
  4. 选择一张图片。
  5. 单击两次“确定”进行确认。

注意:对于纯色背景,只需在 MS Paint 中创建该颜色的图像。

答案4

我使用一个程序XYplorer作为文件管理器,尤其适用于此类项目。它具有许多内置功能,包括为列表窗格中显示的条目添加颜色编码、树窗格中的颜色、粗体和粗体子树以及列表颜色编码的自动规则。

我也遇到过这种情况,即一两个特殊物品被赋予了独特的外观。但我也会使用基于以下因素的自动着色时间。它还具有各种过滤能力,以帮助管理像这样的大树。

如果你是真正使用GUI 文件资源管理器,您应该考虑获取一个比 Windows 自带的资源管理器功能更丰富的资源管理器。

相关内容