avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday June 14, 2024, 7:04 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Comments Column Notes  (Read 6469 times)


  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
IDEA: Comments Column Notes
« on: December 05, 2005, 10:21 PM »
I have looked everywhere for a small utility app that lets users add comments to a folder so the comments appear in the "Comments" column of Windows Explorer.  I have a lot of folders and sub-folders.  Right now I am making the name of each folder really long to accurately describe the contents of the folder.  If the notes would appear in the "Comments" column, the folder names could be made much shorter and easier.  I can make the comments appear for files, but how about for the folder.  Please create a small utility app for adding, deleting and editing folder commets so they appear in the Windows Explorer screen.


  • Member
  • Joined in 2014
  • **
  • Posts: 22
    • View Profile
    • Donate to Member
Re: IDEA: Comments Column Notes
« Reply #1 on: August 07, 2015, 02:47 PM »
This script with add/modify comments on folders via the Desktop.ini, to do this it makes the folder a system folder.
I couldn't figure out how to get explorer to reliably refresh but know that eventually the comments you choose will appear.

Use the script by installing AutoHotkey, double clicking on the script, and pressing alt + z.

; ==========================================================================================================
; Author               : LifeWeaver <[email protected]>
; Script Name        : SetFolderComments
; Script Version     :
; Homepage          :
; Creation Date      : 08/07/2015
; Modification Date :
; Description       : Lets you set comments on a folder via Desktop.ini
; ===================
; ----------------------------------------------------------------------------------------------------------

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

  for window in ComObjCreate("Shell.Application").Windows
    if window.HWND = WinExist("A")
      return window

  return window.Document.SelectedItems().count

SetFolderComments(folderPath, comments)
  desktopIniPath := folderPath . "\desktop.ini"
  ifExist %desktopIniPath%
    ; desktop.ini file exists edit the InfoTip
    FileRead, desktopIniContents, %desktopIniPath%
    ; set default desktop.ini contents
    desktopIniContents := "[.ShellClassInfo]`nInfoTip=`n"
  FileDelete, %desktopIniPath%
  desktopIniContents := RegExReplace(desktopIniContents, "(?<=InfoTip=).*$", comments)
  FileAppend, %desktopIniContents%, %desktopIniPath%
    msgbox problem(%A_LastError%) appending to %desktopIniPath%
    ; Had issues with permission, running via hidden cmd
    Run, %comspec% /c attrib +S "%folderPath%" && attrib +H +S +A "%desktopIniPath%",,Hide
  ; Update explorer
  DllCall( "Shell32\SHChangeNotify", UInt,0x08000000, UInt,0, Int,0, Int,0 ) ; SHCNE_ASSOCCHANGED

  IniDelete, %folderPath%, .ShellClassInfo, InfoTip

window := ActiveExplorerWindow()
InputBox, comment, Folder Comment, Enter folder(s) comment
; if an item(s) is/are selected set the comment on all files selected
  for item in window.Document.SelectedItems()
    SetFolderComments(item.Path, comment)
  folderPath := window.Document.Folder.Self.path
  SetFolderComments(folderPath, comment)


Note: Autohotkey is need to run this script, although you could compile it and merely have an .exe.
Script runs on: Windows 7 Professional, AutoHotkey Unicode build