So I've spent a lot of time working on my Avatar assets drive. I've spent a lot of time organizing it, and after showing a couple people they were interested in using some of my tools to get the same aesthetic that I've worked for.
So I've gotten a few PowerShell Scripts compiled to achieve this. That being said I've already done the bulk of the work, so the only one you'll need is the folder set script which goes into every subfolder in a root folder and changes that subfolders icon to the .ico file inside of it. There's websites that charge money to get these .ICO files to compile, BUT I've worked for several hours with ChatGPT to create a seamless function that will just do it all anyway.
(Download the RAR at the bottom of the post first and take the .ico files of your liking and place them in the appropriate corresponding subfolder before running the command. nothing bad will happen, it just won't do anything for you.)
Run this PowerShell Command in Administrator mode once files are in place:
(Post thought Bumpette here: You have to open a new Notepad file to copy and paste this code in. and then copy your directory root into the space that says: "COPY/AND/PASTE/YOUR/FOLDER/ROOT/HERE" . Make sure to keep the parenthesis though. then you have to save the text file as a "file.PS1" file. so that PowerShell can run it. I recommend using ChatGPT for further instructions)
# Function to change the folder icon
function Set-FolderIcon {
param (
[string]$folderPath,
[string]$iconPath
)
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace($folderPath)
$iconFile = $folder.ParseName($iconPath)
$desktopIniPath = Join-Path $folderPath 'desktop.ini'
# Create or modify the desktop.ini file
Set-Content -Path $desktopIniPath @"
[.ShellClassInfo]
IconResource=$iconPath,0
"@
# Set the folder attribute to system
attrib.exe +s $folderPath
# Set the hidden attribute to desktop.ini
attrib.exe +h $desktopIniPath
# Refresh the folder
$folder.Self.InvokeVerb("Refresh")
}
# Function to get .ico file in a folder
function Get-IcoFile {
param (
[string]$folderPath
)
Get-ChildItem -Path $folderPath -Filter "*.ico" | Select-Object -First 1
}
# Main script
# Set the root directory where the script will run
$rootDirectory = "COPY/AND/PASTE/YOUR/FOLDER/ROOT/HERE"
# Get all subfolders in the root directory
$subFolders = Get-ChildItem -Path $rootDirectory -Directory -Recurse
foreach ($folder in $subFolders) {
# Get the .ico file in the folder
$iconFile = Get-IcoFile -folderPath $folder.FullName
if ($iconFile) {
# Call the function to change the folder icon
Set-FolderIcon -folderPath $folder.FullName -iconPath $iconFile.FullName
Write-Host "Icon changed for folder: $($folder.FullName)"
}
}
Write-Host "Icon change process completed."
This will create a folder that looks similar to this:
Here's the RAR containing all of the .ICO files that I currently have. If anyone is interested, I can also share the script that creates the ICO files for free, though it's a bit of a process. I can also just convert requested ones as well. Just ask :
Thanks for coming to my funny TED Talk. Hope you all had a good weekend!~