Windows 7批处理:查找/ i [英] Windows 7 Batch: Find /i
问题描述
我在Windows 7中有一个Windows批处理文件,用于查找。
I have a windows batch file in Windows 7 which does something with find.
它以这样开头:
find /i /c....
但它说的像
find / i不是中等
find /i is no medium
b $ b
左右。
or so. Then it just gives a list of every single file in the C:\ directory.
是否有新的替换Windows 7?
Is there any new replacement for Windows 7?
编辑:如果我在cmd中找到 find /?
,它会给出 find:/?没有这样的文件或目录
If i hit find /?
in cmd, it gives find: /? there is no such file or directory
推荐答案
您可能已经在您的计算机上安装了posix find命令。类型:
You probably have the posix find command installed on your computer. Type:
where find.exe
找到它。您可以更改系统上的路径环境变量,这样system32目录将是第一个。
To locate it. You probably can change the path environment variable on your system so the system32 directory will be first.
您可以获得如下所示的内容:
You could obtain something like the following :
> where find.exe
C:\Program Files (x86)\Git\bin\find.exe
C:\Windows\System32\find.exe
在上面的例子中,第一个 find
,因此 find / I ...
(MS原始)的命令不再工作。
In the above example, the first find
executable is from Git system, in consequence commands like find /I ...
(MS original) don't work anymore.
strong> Update:首先尝试使用完整路径运行命令:
Update: First try to run the command with full path:
c:\windows\system32\find.exe /i "foo"
看看会发生什么。
然后将文件与其他Windows 7安装中的同一文件进行比较(我现在没有一个)。您还可以查看文件属性。是来自微软吗?
Then compare the file to the same file in other windows 7 installation ( I don't have one right now). You can also look at the file property. Is it from microsoft?
这篇关于Windows 7批处理:查找/ i的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!