How do I open “Find Files” dialog from command-lin

2019-03-30 17:23发布

I'd like to create a hotkey to search for files under a specific folder in Windows XP; I'm using AutoHotkey to create this shortcut.

Problem is that I need to know a command-line statement to run in order to open the standard Windows "Find Files/Folders" dialog. I've googled for a while and haven't found any page indicating how to do this.

I'm assuming that if I know the command-line statement for bringing up this prompt, it will allow me to pass in a parameter for what folder I want to be searching under. I know you can do this by right-clicking on a folder in XP, so I assume there's some way I could do it on the command line...?

11条回答
\"骚年 ilove
2楼-- · 2019-03-30 17:34

If you need just a hotkey then use Win+f.

查看更多
\"骚年 ilove
3楼-- · 2019-03-30 17:34

It's a little unclear whether the end-result you want is the open "find" dialog, or if you're just looking for a command-line way to search an arbitrary directory. If the latter there's FINDSTR (assuming you want to search the content of files and not their names):

What are good grep tools for Windows?

查看更多
Anthone
4楼-- · 2019-03-30 17:35

Based on the answer by Vitim.us from cmd all you need is explorer.exe "search-ms:query=*.exe&crumb=location:C:\Program Files&" Change the location and query as needed

查看更多
Deceive 欺骗
5楼-- · 2019-03-30 17:42

Why don't you try bashing F3? :)

查看更多
乱世女痞
6楼-- · 2019-03-30 17:44

F3 or Win+F is a hotkey that will launch Find Files. If you then do a search using the criteria you want, you can save the search using the File menu. This creates a .FND file. The FND file can be launched from the command line or from a hot key created with autohotkey.

It is possible to edit the .FND file (binary) and change what it is searching for, but I would avoid doing that unless it's the only way you can accomplish what you want. I tried it and it worked fine.

查看更多
小情绪 Triste *
7楼-- · 2019-03-30 17:49

from http://www.pcreview.co.uk/forums/thread-1468270.php

@echo off
echo CreateObject("Shell.Application").FindFiles >%temp%\myff.vbs
cscript.exe //Nologo %temp%\myff.vbs
del %temp%\myff.vbs
查看更多
登录 后发表回答