命令行显示文件的属性? [英] Command-line to show a file's properties?

查看:45
本文介绍了命令行显示文件的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个显示默认Windows属性表的应用程序,我找不到以常规编程方式执行此操作的太多信息,因此我想也许可以通过命令行调用了;有谁知道Windows命令行来调用文件的属性/详细信息窗口?搜索没有任何运气.

I want to write an app that displays the default Windows Properties sheet, I can't find much info on doing it the normal programmatic way, so I'm thinking maybe shell out to a command-line call; does anyone know the Windows command-line to call up a file's property/details window? Not having any luck searching for it.

此窗口在这里:

推荐答案

似乎没有 IS 可以进行此操作的直接命令行调用,因此我快速整理了一个简短的VBScript来做它,因为它似乎是达到最终结果的最快,最简单的方法(至少满足我的特定需求).

It appears that there IS no direct command-line call that can do this, so I whipped up a quick little VBScript to do it, since it appeared to be the quickest and easiest way to achieve the end result (at least for my specific need).

VBScript只需发送Windows快捷键 Alt + Enter ;因此,当文件突出显示时,它将自动将该文件用作将快捷方式发送到的文件.

The VBScript simply sends the Windows Shortcut Alt + Enter; so, when a file is highlighted it'll automatically use that file as the one to send the shortcut to.

对于其他可能想要这样做的人,只需将以下内容粘贴到新的文本文件中,并将其另存为 .vbs 文件:

For anyone else who may want to do the same, just paste the following into a new text file and save it as a .vbs file:

设置WshShell = WScript.CreateObject("WScript.Shell")WshShell.SendKeys%{ENTER}"

对于任何对更好的解决方案感兴趣的人,我最终在VB.NET中编写了一个小型命令行应用程序来执行此操作,这是其完整信息和源代码的链接:

For anyone interested in an even better solution, I ended up writing a small command-line app in VB.NET to do this, here's a link to it's full info + the source code: https://geekdrop.com/x/props

这篇关于命令行显示文件的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆