Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Zephyr)
  • No Skin
Collapse
RipperStore Logo
  1. Home
  2. Guides
  3. Tutorials
  4. Creating ICO file swaps to make your Avatar Assets folder pop!~

Creating ICO file swaps to make your Avatar Assets folder pop!~

Scheduled Pinned Locked Moved Tutorials
1 Posts 1 Posters 627 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bumpette
    wrote on last edited by Bumpette
    #1

    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:

    157c7695-225c-434d-916a-9d6d62ef65d0-image.png

    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 🙂 :

    https://pixeldrain.com/u/eyUtZhD9

    Thanks for coming to my funny TED Talk. Hope you all had a good weekend!~

    1 Reply Last reply
    1
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users