Copy Detailed File Info to Clipboard via Right-Click Menu

The Details tab in the Properties sheet shows the file version, product name, copyright, and other details. However, Windows doesn’t let you copy the information to the clipboard.

copy file information, version, product via right-click menu

In this article let’s see how to copy the file info to the clipboard using PowerShell. You can also incorporate the command to the right-click menu if desired.

Copy File Information via the Context Menu

You can add a “Copy File Info” command to the right-click menu for desired file types (.exe, .dll, .ocx, .sys, etc). This context menu item can be set to copy the file details to the clipboard automatically. Follow these steps to do so:

  1. Download or create your own REG file (e.g., copy_file_info.reg) from the following contents:
  2. Double-click the registry file and click Yes when asked for confirmation.

The “Copy File Info” context menu is now added for .exe, .dll, .ocx, and .sys file types.

copy file information, version, product via powershell

Note: To reduce clutter in the right-click menu, the menu item is implemented as an extended context menu. This means the item would be visible only if you press the Shift key and right-click on the said file type. Also, the menu item is set to appear only for .exe, .dll, .sys, and .ocx file types.

A PowerShell window would open and close quickly, copying the file details to the clipboard. He are some sample data:

FileVersionRaw     : 1.1.0.0
ProductVersionRaw  : 1.1.0.0
Comments           : 
CompanyName        : Sysinternals - www.sysinternals.com
FileBuildPart      : 0
FileDescription    : Run as different user
FileMajorPart      : 1
FileMinorPart      : 1
FileName           : D:\tools\ShellRunAs.exe
FilePrivatePart    : 0
FileVersion        : 1.01
InternalName       : ShellRunas
IsDebug            : False
IsPatched          : False
IsPrivateBuild     : True
IsPreRelease       : False
IsSpecialBuild     : False
Language           : English (United States)
LegalCopyright     : Copyright ? 2008 Mark Russinovich and Jon Schwartz
LegalTrademarks    : 
OriginalFilename   : ShellRunas
PrivateBuild       : 
ProductBuildPart   : 0
ProductMajorPart   : 1
ProductMinorPart   : 1
ProductName        : Sysinternals ShellRunAs
ProductPrivatePart : 0
ProductVersion     : 1.01
SpecialBuild       :
FileVersionRaw     : 10.0.19041.1706
ProductVersionRaw  : 10.0.19041.1706
Comments           : 
CompanyName        : Microsoft Corporation
FileBuildPart      : 19041
FileDescription    : Windows Explorer
FileMajorPart      : 10
FileMinorPart      : 0
FileName           : C:\Windows\explorer.exe
FilePrivatePart    : 1706
FileVersion        : 10.0.19041.1620 (WinBuild.160101.0800)
InternalName       : explorer
IsDebug            : False
IsPatched          : False
IsPrivateBuild     : False
IsPreRelease       : False
IsSpecialBuild     : False
Language           : English (United States)
LegalCopyright     : ? Microsoft Corporation. All rights reserved.
LegalTrademarks    : 
OriginalFilename   : EXPLORER.EXE.MUI
PrivateBuild       : 
ProductBuildPart   : 19041
ProductMajorPart   : 10
ProductMinorPart   : 0
ProductName        : Microsoft? Windows? Operating System
ProductPrivatePart : 1706
ProductVersion     : 10.0.19041.1620
SpecialBuild       :

(Note that FileVersionRaw and ProductVersionRaw are different from FileVersion and ProductVersion data. For further reading, check out How to (correctly) check file versions with PowerShell)




Get File Info using PowerShell manually

If you rather prefer to get file info manually (instead of a context menu addition), you need to open PowerShell and use the following command-line example:

(Get-Item "D:\tools\ShellRunAs.exe").VersionInfo | format-list * -force

copy file information, version, product via powershell

To copy the items to the Clipboard, run:

(Get-Item "D:\tools\ShellRunAs.exe").VersionInfo | format-list * -force | Clip

Tip: You can also use the following PowerShell “Set-Clipboard” method as an alternative to Clip.exe.

(Get-Item "D:\tools\ShellRunAs.exe").VersionInfo | format-list * -force | Out-String | Set-Clipboard

Useful Links (Third-party)

Note that if the asterisk * is not used in the above example(s), many of the file properties (especially the patch/updated file version info) are hidden in the output.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

2 thoughts on “Copy Detailed File Info to Clipboard via Right-Click Menu”

  1. Hello, I tried the code you gave for right click in your article on two different computers, I followed the order of operations step by step, it says the keys and values ​​in reg have been successfully applied to the registry, but copy file information does not appear on right click.

    Reply

Leave a Comment