CMD:文件任务,打开目录并选择文件

Tho*_*hom 4 explorer cmd batch-file

我想打开一个文件夹并从命令行自动选择一个文件:

>> explorer C:\Windows\system32\selected_file.txt
Run Code Online (Sandbox Code Playgroud)

Windows资源管理器打开后,C:\Windows\system32我要selected_file.txt自动突出显示。Windows命令提示符可能吗?

Ton*_*kle 5

explorer.exe /select,c:\windows\system32\selected_file.txt
Run Code Online (Sandbox Code Playgroud)

请参阅https://support.microsoft.com/en-us/kb/130510

  • 有没有一种方法可以选择文件而无需打开新窗口?假设该文件夹已打开,我想在打开的文件夹中选择一个文件。我将如何使用cmd做到这一点? (3认同)