Edit "Comments" field for folders in Windows Explorer / Vista

I thought this was going to be easy.  But apparently not!

I've been asked to find a way to make use of the "Comments" field that's available for both files and folders in Windows to write a short summary of the purpose of a file / folder.  The idea being that in "Details" view in Explorer, the comments attached to each of the items listed would be visible, and he could get an idea of what everything's for without having to open each file / folder.  The client wants to do it this way, rather than using longer or more descriptive filenames.

I found a utility called Hobcomment described here: http://www.freewaregenius.com/hobcomment/.  This apparently works for Windows 2000 and XP, but not for Vista (which is what he's using) and later.  NirExt, by the legendary Nir Sofer (http://www.nirsoft.net/utils/nirext.html) will also do the trick - for 2000/XP.  I tried both of these utilities on Vista, and Hobcomment's shell extension doesn't appear at all, and changes made by NirExt aren't displayed by Explorer.  So no dice with either.

I found a commercial program whose name I forget which also purported to do the trick - but the website warned that it didn't work on Vista and above.

The comments field for folders can be displayed in Vista, but I need a user-friendly way of editing its contents and getting it displayed.  The research that I've done thus far suggests that editing "desktop.ini" files might do the trick, but that definitely fails the user-friendliness test!

I've drawn a blank on this.  Any ideas?
LVL 1
wakatashiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe Winograd, Fellow&MVEDeveloperCommented:
I don't know if this user-friendly enough for you, but it can be done (for most file types) right in Windows Explorer. Here's the MS article that shows how to do it in Vista:

http://windows.microsoft.com/en-us/windows-vista/add-tags-or-other-properties-to-a-file

The tricky thing, which is not at all obvious, is that the Comments field (in Properties>Details) magically appears for data entry when you move the mouse up into its vicinity, as shown in this screenshot:
Properties-Details-CommentsRegards, Joe
0
wakatashiAuthor Commented:
Thanks Joe!  The frustrating thing is that you can do this for files, but not for folders.  You can enable the display of the "Comments" field for folders, but there's no apparent way of entering text into it.  The utilities I found made this happen for 2000/XP, but not for Vista+.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Joe Winograd, Fellow&MVEDeveloperCommented:
My bad! I had "files" on the brain when I read your question, not "folders", but you certainly made it clear that both are needed.

I don't know of a way to do it in Windows Explorer. I use a third-party file manager called Total Commander that has its own capability for this. Its Files menu has a pick called Edit Comment:
TC Edit CommentThis works on files and folders. But it is not the same Comments field as displayed in Windows Explorer. Total Commander implements this feature by storing the comments in a hidden file called <descript.ion>. It displays the info when you hover over the file:
TC hover over fileOf course, it also displays the info when you click the menu Files>Edit Comment (first time the box is empty; subsequent times, the comment is there, both viewable and editable):
TC File commentYou may not want to switch everyone from Windows Explorer to Total Commander, but I've been using TC for about 20 years (rarely use Windows Explorer) and wouldn't be without it. Regards, Joe
0
wakatashiAuthor Commented:
@jcimarron: Hope the naysayers are wrong on this one!

@joewinograd: Thanks for taking so much trouble with the screenshots and explanation of the workaround with Total Commander.   I remember this utility from way back, and see from the website that it still supports everything from Windows 3.1 to Windows 8.  Wow!!  I'd like to hold out for a solution that uses the Comments field that Windows Explorer (on Vista) displays, though, if I can.  Surely there must be some way of doing this!
0
Joe Winograd, Fellow&MVEDeveloperCommented:
You're welcome. I find that screenshots often fall under the "a picture is worth a thousand words" category.

You said your research suggests that editing <desktop.ini> files might do the trick, so you're probably talking about something like this:
http://windowssecrets.com/forums/showthread.php/130263-Windows-Explorer-Folder-Comments

But you also said this fails the user-friendliness test. So how about writing a user-friendly program to edit <desktop.ini>. This should not be difficult.

Then add it to the Windows Explorer context menu...also not difficult. There may be utilities that do this, but if not, here's a tutorial on doing it manually in the registry (and it shouldn't be difficult to write a program to perform these steps):
http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/

Regards, Joe
0
wakatashiAuthor Commented:
Thanks Joe.  Writing programs isn't something I do on a regular basis though, so although I could probably cobble something together and add it to the Explorer context menu by editing the registry as per the article, it would take me ages, and wouldn't be cost-effective for the client.   If I had lots of spare time, I'd do it for the fun of it and the technical challenge, but sadly I don't!  So I'm looking for something "ready rolled" if there's such a thing available.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
I'm not aware of a "ready rolled" solution, but I have confirmed that the following simple technique works:

(1) In the folder where you want a comment, create a <desktop.ini> file that contains the following two lines (in plain text):

[.ShellClassInfo]
InfoTip=whatever comment you want on the folder

(2) Give the <desktop.ini> file the Hidden and System attributes.

(3) Give the folder the Read-only attribute.

That's it! I may be able to find some bandwidth during the weekend to write a program with a nice, easy-to-use interface that would simply ask the user to enter the desired folder comment in a text box and then perform the steps mentioned above. Regards, Joe
0
wakatashiAuthor Commented:
Thanks Joe,

I just tried these manual steps on Windows 8 64-bit, and it certainly works for me.  And as long as the read-only attribute is set on only the folder, and not the stuff inside, it's still possible to edit the folder contents.  Well done sir!

I can't see the client wanting to do that for every folder though - bit labour-intensive.  If your weekend bandwidth allows, and you come up with a program to do this, I would say it would be the most richly-deserved Experts Exchange Accepted Solution of all time!
0
Joe Winograd, Fellow&MVEDeveloperCommented:
I'm glad to hear it works in W8/64-bit...I tried it only in W7/64-bit. Yes, it's important to set the Read-only attribute just on the folder...the contents of the folder can still be modified, while attributes on the files in the folder remain unchanged.

I'm thinking two programs will be needed: (1) A program to add a context menu item such that right-clicking on a folder in Windows Explorer (or other file manager) will have a menu pick that says, "Add folder comment". The user will need to run this program just once. (2) A program that prompts for the folder comment and performs the three steps that you and I have tested manually. This program will be executed each time the user selects the "Add folder comment" item from the context menu in Windows Explorer (or other file manager).

Sound right?
0
wakatashiAuthor Commented:
I've just had another quick look at the link you sent earlier, regarding setting up right-click context menus: http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/.

Maybe we could create a .reg file which could be double-clicked upon when installing.  This would set up the right-click context menu as per the article above, with a reference to a named folder in %programfiles% into which the actual program would go.

What do you think?
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Providing a .REG file would work, but it's probably just as easy to do it in a [Setup.exe] file. Users may be uncomfortable dealing with a .REG file but they're all familiar with running [Setup.exe] files. Just my opinion...either way is fine.
0
wakatashiAuthor Commented:
Sounds great Joe - even better!
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi wakatashi,
As is often the case with programs, they get very complicated very fast. :)   My original thought for the "FolderComment" program was to make it quick-and-dirty, but numerous issues surfaced during coding and testing, such as:

o What to do if there's already a <desktop.ini> file in the folder. Decided not to modify it (they can be fairly complex). Program displays a dialog box saying that a comment may not be added to this folder:
Cannot add commento What to do if there's already a comment. Decided to put it in the input box so the user doesn't have to retype the entire comment just to change a character or two, such as fixing a typo (screenshot further down).

o What to do about errors. Decided to display a simple error code that is unique to each error so an admin can try to figure out what's wrong (notice error code in title bar of dialog above).

o What to do if no comment is entered (or Cancel button is clicked on input box). Decided to display a dialog box saying this and then exit:
Cancel button or no commento What to do about providing a way to delete a comment. Decided to offer this feature by having the user enter just an exclamation point as the comment. I toyed with the idea of letting the user delete the text in the input box, but decided the entry of an exclamation point was better. This avoids the problem of the user mistakenly hitting Delete and then clicking OK...and I didn't want a confirmation dialog for deleting (too cumbersome). The input box dialog mentions the need for an exclamation point to delete a comment:
Enter comment input box when comment existsBut only if there's an existing comment:
Enter comment input box when comment does not existo What to do about installing and uninstalling. Decided to build a complete installer that also creates an uninstaller. I want it to be as easy as possible for users to install, so all they have to do is run a Setup program, which I named <Setup_FolderComment.exe> so it is not confused with other <Setup.exe> programs (of course, you may name it whatever you want). I also want users to be able to uninstall the program, so this is done in the standard Windows way, i.e., go into Programs and Features in Control Panel, select the FolderComment program, and click Uninstall.

If UAC is on, the installer requests admin rights. It creates a folder called FolderComment in Program Files (x86) or Program Files (depending on Windows version) and places the FolderComment executable in it, as well as an icon for the program. It also puts a license agreement (probably the GNU GPL V3, but I haven't decided for sure yet) and the uninstaller executable in the program folder. In addition, it creates the two HKCR registry entries as documented in the HowToGeek article (doing this in the installer means your users don't have to deal with a .REG file). This adds a pick that says "Add folder comment" to the context menu (right-click) of folders:
Folder context menuThe installer also creates a shortcut in Start Menu>Programs to "FolderComment>FolderComment Help". This is actually the same executable (<FolderComment.exe>), but the program detects that no folder name has been passed as a parameter, so it displays this help message:
FolderComment HelpThe installer creates all of the registry entries needed for the uninstaller. When the uninstaller runs, it deletes/removes everything related to the FolderComment program, in both Program Files (x86) or Program Files, and the registry. However, it does not remove any comments that had been placed on folders (i.e., it leaves the <desktop.ini> files intact) and it does not remove the Read-only attributes from these folders.

Can you think of anything that I missed? Or anything else that you need?

I thoroughly tested all aspects of it here on a W7/64-bit system...installing and uninstalling many times (btw, you may reinstall without having to uninstall)...and adding/changing/deleting many folder comments. But it's important for you to take it for a spin (several spins) and let me know if you have any problems.

I'm now thinking that this could be of value to other EE members, so I'm considering writing an article about it, but I'd like your feedback first. I'm putting some finishing touches on the program now and will get it to you when I hear back from you with your thoughts on this post. Regards, Joe
0
wakatashiAuthor Commented:
Wow Joe - this is massively cool!  You've clearly put a lot of thought into this.  Thank you so much!  As you say, I have no doubt it would be of interest to other EE members, and indeed others worldwide.

Feedback-wise, I think it's great as it stands.  The only thing I'd personally have done differently would be how the deletion of comments works.  I'd have gone with your original idea of letting the user delete the text in the text box, as it feels more intuitive to me.

What happens if the user right-clicks on a file rather than a folder?  Does it allow comments to be added for these also, or does the context menu item just not appear when files are right-clicked upon?

What programming environment did you use for all of this, by the way?  I'd love to be able to be able to do this kind of thing!

Cheers,
Dave
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> I'd have gone with your original idea of letting the user delete the text in the text box, as it feels more intuitive to me.

Dave, I went back-and-forth on this. If you think that's better, it works for me, so I just changed the code to do it. Now the dialog box says "(or clear input box to delete current comment)":
changed technique to delete current commentIf the user deletes the comment by clearing the input box and clicking OK, it shows this:
Comment deleted> What happens if the user right-clicks on a file rather than a folder?

Standard context menu for files appears. The program does nothing with respect to comments for files, which I figure is pretty well handled by Windows with Properties>Details>Comments.

> Does it allow comments to be added for these also, or does the context menu item just not appear when files are right-clicked upon?

The latter.

> What programming environment did you use for all of this, by the way?

I wrote the FolderComment program in AutoHotkey (AHK), an excellent (free!) programming/scripting language. There have been several forks of the original language and my preferred one now is AutoHotkey_L. It comes with a compiler that turns the AHK source code (plain text) into a stand-alone/no-install executable (an EXE file).

I wrote the installer/uninstaller in the Nullsoft Scriptable Install System (NSIS), also an excellent (free!) product. Interestingly, the installer/uninstaller script is about the same number of lines of code as the AutoHotkey program (but I borrowed heavily from a sample NSIS script and other NSIS scripts that I built previously, so there was relatively little new code). I fed the EXE created by the AHK compiler into NSIS and it created a setup executable (<Setup.exe> or whatever you want to call it) that installs everything, as well as creating an uninstaller.

> I'd love to be able to be able to do this kind of thing!

I'm sure you can. Both languages (AHK and NSIS) are relatively easy to learn, have good documentation, and active support communities that are very helpful. Regards, Joe
0
wakatashiAuthor Commented:
Great, thanks Joe.  Will check out AutoHotKey_L - sounds interesting!

Maybe it's a Windows 8 thing, but I can't see any way of editing the Comments field for files either.  If I go to Properties>Details for a file, this is an example of what I get:

Details tab of file properties
There's no way that I can see of editing any of the properties displayed, nor a way of adding another item to the list that's already there.  Is it different on your Windows 7?

Cheers,
Dave
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Dave,
That's probably because you tried it on an ECF file (same thing would probably happen in W7). Seems that comments are not allowed on all file types (I don't know why). Try it on a JPG file and you'll likely see the dialog that I posted in my first comment in this thread...that's what happened when I just did it on a W8/64-bit system. Regards, Joe
0
wakatashiAuthor Commented:
Ah yes! Works for a JPEG.  But not for a Microsoft Word file - the field is there, but is not editable.   And in the case of a PDF, the field is missing altogether.  Sheesh!  They sure make this difficult, don't they?

I think folders are the most important thing, though.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> the field is there, but is not editable

Probably means the file is marked Read-only. The Comment field works fine here for doc, docx, xls, and xlsx, but is not editable if the file is Read-only.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Dave,
I suggest changing the context menu item from "Add folder comment" to just "Folder Comment" (or "FolderComment" – no space), since "Add" isn't completely accurate...you can add, change, delete, or simply view the comment. Another idea is to change it to "Add/change/delete folder comment" ("view" is pretty obvious). Which do you think is better? Or do you have a different idea for it? Thanks, Joe
0
wakatashiAuthor Commented:
Hi Joe,

Oops, sorry: insufficient research on my part!  Every Word doc I click on now has an editable comments field, as do Excel files.  I can't remember which Word doc I tried the other day, but I guess it was read-only, as you say. PDFs still don't have a comments field at all, but that's much less important.  

As for the context menu item, my vote would be either for "Folder Comment" or "Edit Comment" (it could be argued that the word "folder" could be omitted because the only time the menu would appear would be when a folder was right-clicked on)

Cheers,
Dave
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Yes, the Details tab is different for PDFs. I guess they figure that the PDF Information tab covers it, with fields for Title, Subject, Author, and Keywords. However, you can't edit those fields in the PDF Information tab...you can just view them...you need to change them in a PDF product, such as Adobe Acrobat. Go figure.

"Edit Comment" is an interesting idea, and you're right about the possibility of omitting "Folder", but let's go with "Folder Comment".

The program is ready for your testing. I mentioned earlier that I thoroughly tested all aspects of it on a W7/64-bit system, and since then I have done the same on a W8/64-bit system. Time for another set of eyes to take a look at it! However, I'm not ready to expose it to all 100,000+ members of EE, so please look in my EE profile and drop me an email to make arrangements for getting the file to you. I haven't made a final decision on how to license it, so the current version contains the GNU GPL V3, but I reserve the right to change that in the final version.

You'll be running an installer that I called <Setup_FolderComment.exe>, but you may change it to <Setup.exe> or whatever name you prefer. It's working perfectly here, but you should take whatever precautions make you comfortable when installing new software, such as using a sandbox, cloning the hard drive drive, setting a restore point, whatever. Then run it to install the FolderComment program and create the uninstaller, as I described earlier. Click the Details button when the installation is complete to make sure that everything looks good. You should see something like this:
FolderComment install detailsTest uninstalling, too (via Control Panel>Programs and Features). Click the Details button when the uninstallation is complete to make sure that everything looks good. You should see something like this:
FolderComment uninstall detailsThen reinstall and test everything:

add, change, delete comments

when there's an existing comment and when there isn't

on a system folder which already has a <desktop.ini> file, meaning add-comment should not be allowed

clicking Cancel button to make sure a change is discarded

and whatever else you can think of!

Looking forward to getting your email and then hearing the results of your testing. Regards, Joe
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi Dave,
A quick update to my last post. I have since tested it on two more platforms...XP/32-bit and W7/32-bit...works fine on both. Looking forward to hearing from you soon. Regards, Joe
0
wakatashiAuthor Commented:
(conversation is continuing via direct e-mail - will post results here once everything has been concluded)
0
Joe Winograd, Fellow&MVEDeveloperCommented:
For those following this thread, I completed version 1.0 of the FolderComment program. As I said earlier, I wanted Dave to take it through its paces before exposing it to all 100,000+ EE members. It's a good thing we did it that way, as Dave made numerous suggestions that significantly improved the program. I mentioned previously that I was considering writing an article for publication here at EE and still am, but I need to sort out some issues first...and then find the time to write it. Also, I've already begun work on version 1.1, which has a major enhancement (a search function) and several minor improvements, so it makes sense to delay the article so that it can discuss v1.1. Regards, Joe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wakatashiAuthor Commented:
Thank you very much, Joe, for the huge amounts of work you've put into this.   I certainly never expected you to write a piece of software from scratch to meet the requirements of the question - wow!

For others reading this thread: Joe Winograd's "FolderComment" works well.  I understand that he plans to make it generally available once version 1.1 is complete and tested, and that he'll post a link to it in this thread.
0
wakatashiAuthor Commented:
Amazing piece of work - and so far beyond anything I expected to happen when I originally asked the question.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Dave,

You're very welcome. Thanks for the kind words – I really appreciate hearing them! Thanks, too, for your numerous ideas that improved the program significantly, as well as your beta testing of the many versions along the way.

Yes, I'll post back here when 1.1 is complete...or when the EE article about this effort is published. Regards, Joe
0
Andy DobsonCommented:
I realise this is quite an old thread but I would love to get my hands on your FolderComment program, Joe - but I couldn't see that it was ever released?

So far I'm following your advice with the 'desktop.ini' file, but an automated program would be far more efficient! Thank you in advance.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi Andy,

I see that you joined EE today — welcome aboard! Thanks for your interest in my FolderComment program. After this thread, I enhanced it with a feature to change the color of a folder, and then added the ability for the folder to be a color symbol, such as a green checkmark and a red X. This EE thread discusses the new feature (and shows all the color and symbol choices):

https://www.experts-exchange.com/questions/28588245/How-can-I-add-a-description-comment-to-a-folder-that-displays-upon-mouse-hovering.html

With the color enhancement, the new program is called FolderComment&Color. All of that is the good news. The bad news is that I still haven't come to grips with an end-user license agreement (EULA). I also haven't finalized the user interface for the context menu selection. I wound up not liking my own proposal for it mentioned in the thread above, and subsequently came up with this:

FolderComment&Color UI
So I added only one context menu item for FC&C, which looks like this:

FolderComment&Color context menu
All user operations now occur via menu picks in the dialog that comes up after selecting the one-and-only FC&C context menu item.

I've been using FC&C internally for a long time but haven't given any thought recently to what it would take to release it. I'll do that during the coming week and will keep you updated. Cheers, Joe
1
Andy DobsonCommented:
Thank you for your fast response and kind welcome, Joe.

Loving the new features that you've added to the application! I'll jump in to the discussion on the other thread so as not to have two discussions going on the same thing..
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Thanks for the kind words, Andy. I'll head over to the other thread for your comments. Regards, Joe
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Vista

From novice to tech pro — start learning today.