13

Basically, I have a large body of assorted media (text, images, flash files, archives, folders, etc...) and I'm attempting to organize it.

Windows Explorer has a rating column, but there seems to be no way to modify the rating of the files short of opening them in their type-specific software (e.g. Media player, or Photo viewer). However, this does not work when the file is of an unsupported type (.rar, .swf ...), or a directory.

I'd be more than willing to consider a file-manager replacement (I've alreadly looked at quite a few, Directory Opus, Total Commander, etc...), or even a solution that stores the rating metadata in a hidden file in each folder, or a separate database. The one real critical requirement is the ability to sort by rating, and being filetype-agnostic.

Basically, is there any way to categorize a large collection of assorted files by rating that will work with any file type, including directories?

-

Ideally, there would be an easy way to add arbitrary columns to windows explorer, and edit them directly. However, there seems to be no way to do this. The rating column is the next best thing.


For what it's worth, at this point I've more or less given up on finding something that can do what I'm looking for as described in the question. I'm now mostly using a special-purpose python webapp to manage a lot of my media content (it's a great way to learn web-programming).

4
  • You might get an answer if you started accepting answers to older questions.
    – Zian Choy
    Nov 18, 2010 at 2:36
  • 4
    As soon as I get valid answers to most of my other questions, I'd be more than happy to accept them.
    – Fake Name
    Jan 13, 2011 at 7:00
  • 1
    It sounds like Fake might enjoy a "cataloging" program. like the programs you could catalog all your CDs Or DvDs or Music with, but for files instead. I have seen many of those when wandering freeware, but it is not my thing. The stored "database" has stuff libraried from everywhere , and can easily be re-sorted and tagged and commented.
    – Psycogeek
    Sep 30, 2011 at 12:49
  • @Psycogeek - Yeah, pretty much. As an aside, This question is kind of less valid now, because I have mostly switched to Mac for my casual computing (which I what I want the cataloging application for). No solution there, either, though.
    – Fake Name
    Oct 1, 2011 at 3:25

9 Answers 9

9
+50

I made a really tiny program in AutoHotKey that does what you want.
It displays files and folders and there is a rating column that you can click to set a rating between 0 and 5. It displays '--' if the file has not been rated yet. You can click on the column headers to sort. Double click on a folder to go into it or a file to open it.

The data is stored in a .ini file in the same directory as the program.

You can download the binary here: rater.exe
And the source (in AutoHotKey language): rater.ahk

1
  • I'm sad no one suggested a better answer. I would be thankful to see the same program with explorer integration. Oct 5, 2011 at 22:46
3

The rating column in Windows shows the rating metadata found in media files; Windows does not maintain this data itself. You can edit it by right clicking the file, choosing "Properties", and then selecting the "Details" tab.

Screenshot.

In the case of non media files (rar, swf), there is no rating metadata, so there's no way for Windows to show or allow you to edit this information so you will definitely need some other software to do this for you.

2
  • 1
    I'm aware of this. What I am looking for is a extension for explorer which adds and populated additional columns. This was possible through things like iColumnProvider in XP, and should still be somewhat available in 7, though a different API.
    – Fake Name
    Jan 13, 2011 at 6:57
  • I'm hoping to find some explorer extensions which do this, though I have done some research into how it could be done myself. However, I'm not a skilled enough programmer to write a complex thing like this myself.
    – Fake Name
    Jan 13, 2011 at 6:58
1

I've been searching for a solution to this problem of Rating and Tagging folders in Windows 7. On my recent search I found your question and later on I found this useful tool. Taggtool.

It can also tag/rate Folders, just like files. and you can search based on these tags. I've started using this tool and its very efficiently organizing my huge collection of documents, images, videos, and other types

Try it here: http://www.taggtool.com/.

Remember to "Run as Administrator" while executing the setup, as it needs permissions to access the File System. You might also want to increase the Font size from the Settings, once you've iinstalled the system

1
  • This program is not the same as what you have suggested. Dec 19, 2016 at 2:09
0

The best that I found is a external program called XnView http://www.xnview.com/ it's freeware for personal use. Yoy can rate folders and files and assing a color, i found one bug (but solutionable) that is if the classfied material disk changes unit name (G: F: etc) the classifications disapear. The solution is to use the Description feature instead, you can put a number (or wat you want) there, dose data is saved in a file in the same directory of the classified data (so is very useful and independent of what computer you use)

0

This is what works on Win7:

in your folder, right click -> Sort by -> More...

Then scroll to 'Rating' and check the checkbox.

1
  • 2
    Please read the question again carefully. Your answer does not answer the original question. He wants to change the rating not just display it.
    – DavidPostill
    Oct 15, 2015 at 22:00
0

I've used the tag and some special character ■, which are recognized by explorer, at least for the files I'm using (office). Not perfect but does the trick for me

What I meant is that you can use a number of characters to "rate" your file ■ ■ ■ ■ ■ v good ■ ■ ■ ■ good etc...

0

Had the same problem just now and this worked perfectly: After you go to the "Details" tab in Properties, there's a link on the bottom of the window that says "Remove Properties and Personal Information." Click on that and select "Remove the following properties from this file" (the options on top). Then check the Rating box and click "Ok."

0

You can leverage built-in Explorer functionality to add a Rating property to filesystem folders (directories) with no third-party software, via a desktop.ini file and a registry edit.

It does require Admin permission to modify HKLM enttries that establish the desktop.ini -> Rating property mapping, but that's a one-time per-machine setting. No special permissions required in normal operation.

The relevant registry key is:

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DesktopIniPropertyMap\PropertySetStorage

where the subkey {F29F85E0-4FF9-1068-AB91-08002B27B3D9} is the FMTID of the COM Summary Information property set and the subkey 6 specifies the PropertyID of System.Comment within the set. The valuse under this key specify the corresponding desktop.ini entry, specifying the Section , Key (value name), and VarType. So the .reg file to associate Rating to a custom desktop.ini file is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DesktopIniPropertyMap\PropertySetStorage\{64440492-4C8B-11D1-8B70-080036B11A03}\9]
"Key"="Rating"
"Section"="Custom"
; 0x17 = 23 = VT_UINT
"VarType"=dword:00000017


The associated entry in a folder'sdesktop.ini file would be:

[Custom]
Rating=75

THe System.Rating documentation give the integer range for each star value:

Stars Default Min Max
(None) 0 0 0
One 1 1 12
Two 25 13 37
Three 50 38 62
Four 75 63 87
Five 99 88 99

and that's all that's needed to enable folders to have a Rating property that can be displayed in Explorer.

But it's not very practical to create/edit a folder's desktop.ini file manually anytime you want to set/change a folder's rating. But with more registry magic and a PowerShell script, you can create context menu entries to automate the task.

enter image description here

The following code is an all-in-one script to create the property mapping, context-menu entries, the run-time script, and supporting files.

It must be run by an Admin user in an Admin PowerShell console:

### Global Values ###

Clear-Host
echo @'
To install this script, even for a single user, you must have Admin permissions
and run this code in an Admin PowerShell window. This is due to the need to create
the property mapping entries under HKLM.

But the context menu entries and file location can be created for machine-wide
use or only for the user running this script.

Do you wish to install this script for all users or just the currently logged-in user?

'@
Do {} Until ((Read-Host 'A(ll users) or C(urrent user)') -match 'a|c')

$Drive = If ($Matches[0] -eq 'a') {'HKLM:'} ELse {'HKCU:'}

$Null  = Read-Host @'


If you're installing this script for all users, be sure to select a file location
where all users have at least read permissions, such as the folders uner
"C:\Users\Public".

:--- Press <Enter> to continue ---
'@

$BrowseRoot  = If ( $Drive -eq 'HKLM:' ) {"shell:Public"} Else {"shell:UsersFilesFolder"}
$ScriptFiles = (New-Object -com shell.application).BrowseForFolder(0,"Script files location",0x50,$BrowseRoot).Self.Path

echo ('Script files will be created in "{0}"...' -f $ScriptFiles)

### Registry entries creation ###

echo 'Creating registry entries...'

####### Property Mapping ###

$IniPropMap  = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DesktopIniPropertyMap\PropertySetStorage'
$RatingMap   = "$IniPropMap\{64440492-4C8B-11D1-8B70-080036B11A03}\9"

Set-ItemProperty (mkdir $RatingMap -Force).PSPath -InputObject ([PSCustomObject]@{
    'Key'     = 'Rating'
    'Section' = 'Custom'
    'VarType' = 0x17
})

####### Context menu entries ###

########### Set Rating ###

$TopKeys     = @( (Join-Path $Drive 'SOFTWARE\Classes\Directory\Background\Shell\RateFolder') ,
                  (Join-Path $Drive 'SOFTWARE\Classes\Directory\Shell\RateFolder') )
$Ratings     = @( 0 , 1 , 25 , 50 , 75 , 99 )

Set-ItemProperty (mkdir $TopKeys -Force).PSPath -InputObject ([PSCustomObject]@{
    'MUIVerb'         = 'Set Rating'
    'Position'        = 'Top'
    'SeparatorBefore' = ''
    'SubCommands'     = ''
})
Set-ItemProperty $TopKeys 'Icon' '%SystemRoot%\system32\imageres.dll,-1024' -Type ExpandString

0..5 | %{
    $splat = @{
        'Name'  = 'MuiVerb'
        'Value' = If ($_) {'★' * $_} Else {'(None)'}
        'Type'  = 'ExpandString'
    }
    Set-ItemProperty (mkdir (Join-Path $TopKeys "Shell\$_") -Force).PSPath @splat | out-null

    $splat = @{
        'Name'  = '(Default)'
        'Value' = ('"{0}\AddProp.bat" "{2}%V{2}" {1} Rating' -f $ScriptFiles , $Ratings[$_] , "'")
        'Type'  = 'String'
    }
    Set-ItemProperty (mkdir (Join-Path $TopKeys "Shell\$_\Command") -Force).PSPath @splat | out-null
}
########### Add Comment ###

$TopKeys     = @( (Join-Path $Drive 'SOFTWARE\Classes\Directory\Background\Shell\AddComment') ,
                  (Join-Path $Drive 'SOFTWARE\Classes\Directory\Shell\AddComment') )
Set-ItemProperty (mkdir $TopKeys -Force).PSPath -InputObject ([PSCustomObject]@{
    'MUIVerb'         = 'Add Comment'
    'Position'        = 'Top'
    'SeparatorAfter' = ''
})
$splat = @{
    'Name'  = '(Default)'
    'Value' = ('powershell.exe -NoProfile -Command "{0}\Set-FolderProps.ps1" "{1}%V{1}" Comment' -f $ScriptFiles , "'")
    'Type'  = 'String'
}
Set-ItemProperty (mkdir (Join-Path $TopKeys 'Command') -Force).PSPath @splat  



### Set-FolderProps.dll creation ###
###
###     Compiled Add-Type to access/wrap the APIs:
###       - ShowWindow() - https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow
###       - WritePrivateProfileString() - https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-writeprivateprofilestringa
###       - SHGetSetFolderCustomSettings() - https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetsetfoldercustomsettings
###
###     Exposed Functions:
###       - [API]::ShowWindow(hWnd,nCmdShow)
###       - [Desktop.ini]::SetInfoTip(FolderPath,InfoTip)
###       - [Desktop.ini]::GetInfoTip(FolderPath)
###       - [Desktop.ini]::SetRating (FolderPath,Rating)

echo 'Creating "Set-FolderProps.dll"...'

Add-Type @'
using System;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;

public class API {

    public enum SW : int {
        Hide            = 0,
        Normal          = 1,
        ShowMinimized   = 2,
        Maximize        = 3,
        ShowNoActivate  = 4,
        Show            = 5,
        Minimize        = 6,
        ShowMinNoActive = 7,
        ShowNA          = 8,
        Restore         = 9,
        Showdefault     = 10,
        Forceminimize   = 11
    }
    [DllImport("user32.dll")]
    public static extern int ShowWindow(IntPtr hwnd, SW nCmdShow);
}


namespace Desktop {
    public class ini {

        [DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool WritePrivateProfileString(
            [MarshalAs(UnmanagedType.LPWStr)] string lpAppName,
            [MarshalAs(UnmanagedType.LPWStr)] string lpKeyName,
            [MarshalAs(UnmanagedType.LPWStr)] string lpString,
            [MarshalAs(UnmanagedType.LPWStr)] string lpFileName );

        [DllImport("shell32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
        static extern int SHGetSetFolderCustomSettings(
            SHFolderCustomSettings           pSettings,
            [MarshalAs(UnmanagedType.LPWStr)]
            string                           pszPath,
            FCS                              dwReadWrite);

        [StructLayout(LayoutKind.Sequential)]
        public class SHFolderCustomSettings {
            public int    Size;
            public FCSM   Mask;
            public IntPtr pvid;
            public IntPtr pszWebViewTemplate;
            public int    cchWebViewTemplate;
            public IntPtr pszWebViewTemplateVersion;
            public IntPtr pInfoTip;
            public int    ccInfoTip;
            public IntPtr pclsid;
            public int    dwFlags;
            public IntPtr pszIconFile;
            public int    cchIconFile;
            public int    iIconIndex;
            public IntPtr pszLogo;
            public int    cchLogo;
        }


        public static int  SetInfoTip ( string FolderPath,
                                        string InfoTip      ) {

            SHFolderCustomSettings
                MySettings       = new SHFolderCustomSettings();

            MySettings.Size      = Marshal.SizeOf(MySettings);
            MySettings.Mask      = FCSM.INFOTIP;
            MySettings.pInfoTip  = Marshal.StringToHGlobalUni( InfoTip );
            MySettings.ccInfoTip = 0;

            int Result = SHGetSetFolderCustomSettings( MySettings,
                                                       FolderPath,
                                                       FCS.FORCEWRITE );
            Marshal.FreeHGlobal( MySettings.pInfoTip );
            return Result;
        }

        public static string  GetInfoTip ( string FolderPath ) {

            SHFolderCustomSettings
                MySettings       = new SHFolderCustomSettings();
            MySettings.Size      = Marshal.SizeOf(MySettings);
            MySettings.Mask      = FCSM.INFOTIP;
            MySettings.pInfoTip  = Marshal.AllocHGlobal(1024);
            MySettings.ccInfoTip = 1024 / 2 ;

            int Result = SHGetSetFolderCustomSettings( MySettings,
                                                       FolderPath,
                                                       FCS.READ );
            string InfoTip = "";
            if ( Result == 0 )
            {
                InfoTip = Marshal.PtrToStringUni( MySettings.pInfoTip );
            }
            else
            {
                InfoTip = "";
            }
            Marshal.FreeHGlobal( MySettings.pInfoTip );
            return InfoTip;
        }

        public static void SetRating ( string FolderPath,
                                       int    Rating      )
        {
            DirectoryInfo dir = new DirectoryInfo(FolderPath);
            AddItem ( FolderPath,
                      @"Custom",
                      @"Rating",
                      Rating.ToString() );
            dir.Attributes |= FileAttributes.ReadOnly;
        }

        public static bool AddItem ( string FolderPath,
                                     string Section,
                                     string KeyName,
                                     string Value       )
        {
            string   IniFilePath   = Path.Combine(FolderPath, @"desktop.ini");
         
            bool Return = WritePrivateProfileString( Section,
                                                     KeyName,
                                                     Value,
                                                     IniFilePath );
            File.SetAttributes( IniFilePath,
                                ( FileAttributes.Hidden |
                                  FileAttributes.System |
                                  FileAttributes.Archive  ));
            return Return;
        }
         
        public static int  SetNone ( string FolderPath ) {

            SHFolderCustomSettings
                MySettings       = new SHFolderCustomSettings();
            MySettings.Size      = Marshal.SizeOf(MySettings);
            MySettings.Mask      = FCSM.NONE;

            int Result = SHGetSetFolderCustomSettings( MySettings,
                                                       FolderPath,
                                                       FCS.FORCEWRITE );
            return Result;
        }

        private enum FCS : uint {
            READ            = 0x00000001,
            FORCEWRITE      = 0X00000002,
            WRITE           = 0X00000003,
        }

        [FlagsAttribute]
        public enum FCSM : uint {
            NONE            = 0x00000000,
            VIEWID          = 0x00000001,
            WEBVIEWTEMPLATE = 0x00000002,
            INFOTIP         = 0x00000004,
            CLSID           = 0x00000008,
            ICONFILE        = 0x00000010,
            LOGO            = 0x00000020,
            FLAGS           = 0x00000040
        }
    }
}
'@ -OutputAssembly "$ScriptFiles\Set-FolderProps.dll"

### Set-FolderProps.ps1 cration ###
###    Script file as Here-String written
###    to $ScrptFiles folder selected by user

echo 'Creating "Set-FolderProps.ps1"...'

@'
Add-Type -Path "{0}\Set-FolderProps.dll"
$ThisWindow = [System.Diagnostics.Process]::GetCurrentProcess().MainWindowHandle

Switch ($Args[-1]) {
    'Rating'
    {
        [API]::ShowWindow($ThisWindow ,'Hide') | out-null
        $return = [Desktop.ini]::SetRating($Args[0],[Int]$Args[1])
        $Return = [Desktop.ini]::SetInfoTip($Args[0],([Desktop.ini]::GetInfoTip($Args[0])))
        @((New-Object -com shell.application).Windows()).Foreach({ $_.Refresh() })
    }
    'Comment'
    {
        [API]::ShowWindow($ThisWindow ,'Show') | out-null
        $Comment = Read-Host Comment
        [API]::ShowWindow($ThisWindow ,'Hide') | out-null
        $return = [Desktop.ini]::SetInfoTip($Args[0],$Comment)
        @((New-Object -com shell.application).Windows()).Foreach({ $_.Refresh() })
    }
}

'@ -replace ('\{0\}',$ScriptFiles) | Set-Content "$ScriptFiles\Set-FolderProps.ps1"

### AddProp.bat cration ###
###     Wrapper to hide PowerShell window flash

echo 'Creating "AddProp.bat"...'

@'
:: Batch wrappoer to hide PowerShell window

 cmd /c start /min "" powershell.exe -NoProfile -Command "{0}\Set-FolderProps.ps1" %1 %2 %3

:: Troubleshooting
:: powershell.exe -NoExit -NoProfile -Command "{0}\Set-FolderProps.ps1" '%1' %2 %3

::Usage: SetProp.bat %V <PropertyValue>[Rating|Comment]

'@ -f $ScriptFiles | Set-Content "$ScriptFIles\AddProp.bat"

echo 'Done!'

-1

It's simple. In Windows explorer, first click on Organize and show the details pane. Then click on a file which has the rating column attribute displayed (you may need to enable the ratings column first). At the bottom details pane, the rating stars are also shown. Double click on a star rating you want to assign. A save button appears, then click save and it will update the rating attribute for that file.

Note that if the file is currently locked, such if the file is open in another program such as a music player, then you cannot alter the file metadata.

1
  • 1
    This only works for files where windows explorer knows how to alter the file metadata, e.g. not at all for any of the files I care about.
    – Fake Name
    Apr 6, 2016 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.