File Explorer: File Count on Desktop Icon Possible?


  1. Posts : 162
    Windows 10 Pro
       #1

    File Explorer: File Count on Desktop Icon Possible?


    I think I might be looking at possibly having to write an app specifically for this, but I'm wondering if there's a way to display a file count on the Desktop Icon for a shortcut called Documents (obviously linked to the Documents folder)? Point being, in a public setting, I'd like to give users in a public environment a subtle reminder that there are user files saved onto the computer before they log off, by simply showing a number on top of the Desktop Icon. Users are allowed to save files in the My Documents folder, but our system will clear the folder out when the user logs off.
      My Computer


  2. Posts : 1,218
    Windows 10 Pro
       #2

    Windows doesn't have this as an inbuilt feature. The reason being the potentially serious impact it could have on performance. Presumably you would want the count to include files in all sub folders of the folder in question. To obtain this would require recursively going through each folder and all sub folders to get the file count. In your situation this would not likely be a problem. But consider if this was a large folder on a remote server over a slow network connection. Anyone with the necessary permissions could create such a shortcut. Such a feature could saturate the network bandwidth without it being used for it's intended purpose. The bitter complaints Microsoft would receive from network managers would ensure such a feature would not be provided.

    This could be done with third party software.
      My Computer

  3. Ztruker's Avatar
    Posts : 13,521
    Windows 10 Pro X64 20H4 19042.928
       #3

    Since this is a Public use computer, the number of folders and files will be very small so the impact to performance will be negligible. You could easily do something with a Powershell command I'm sure. Get one of our Powershell wizards to whip up something that displays the number of folders and files in Documents, should be a piece of cake. I could probably come up with something if no one else does and I'm not a Powershell guru by any means.

    Edit: This gives you the number of files in Documents:
    Get-ChildItem $env:USERPROFILE\Documents | Measure-Object | %{$_.Count}

    This gives you the number of files in Documents and all sub-folders:
    Get-ChildItem $env:USERPROFILE\Documents -Recurse | Measure-Object | %{$_.Count}


    Now all you need is a way to show a message on the Desktop that can be updated every so often and your all set.
      My Computers


  4. Posts : 162
    Windows 10 Pro
    Thread Starter
       #4

    Ztruker said:
    Since this is a Public use computer, the number of folders and files will be very small so the impact to performance will be negligible. You could easily do something with a Powershell command I'm sure. Get one of our Powershell wizards to whip up something that displays the number of folders and files in Documents, should be a piece of cake. I could probably come up with something if no one else does and I'm not a Powershell guru by any means.

    Edit: This gives you the number of files in Documents:
    Get-ChildItem $env:USERPROFILE\Documents | Measure-Object | %{$_.Count}

    This gives you the number of files in Documents and all sub-folders:
    Get-ChildItem $env:USERPROFILE\Documents -Recurse | Measure-Object | %{$_.Count}


    Now all you need is a way to show a message on the Desktop that can be updated every so often and your all set.
    You would be correct. The number of items would probably never go too crazy. Users are allotted up to 4 hours of computer usage per day, once they have been logged out, either by the user or forcefully (we log them out or they've used up their time), their file will be deleted. Much like an Android notification where it'll show a number of unread texts you have right on your Texting app, I essentially want to do the same thing on a shortcut to the My Documents folder, only, and not count every single file on the hard drive.

    I guess with that said, is there any known third party app that will add such a notification to Windows 10? I honestly wouldn't know how to go about writing an app, specifically to do this. Specifically, I wouldn't know how to program an icon so it updates such notification counts (in this case, containing file/folder count) in real-time.
      My Computer

  5. Ztruker's Avatar
    Posts : 13,521
    Windows 10 Pro X64 20H4 19042.928
       #5

    Like I said, I'm not a Powershell wiz but I know someone who is. Let me see if I can get him interested in looking at this for you.
      My Computers

  6. Ztruker's Avatar
    Posts : 13,521
    Windows 10 Pro X64 20H4 19042.928
       #6

    I know it's been awhile but I just got this as a suggestion from a friend.

    Sysinternals has an interesting program, Maybe it can be mucked with to do what you want????????

    Sysinternals BgInfo 4.28


    Caution, using it changes the Desktop background.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 01:19.
Find Us




Windows 10 Forums