|
mandyonly
初级用户
 
积分 28
发帖 9
注册 2007-4-26
状态 离线
|
『楼 主』:
提取文件版本信息(版本号)
使用 LLM 解释/回答一下
请问:如何将windows文件夹中的文件名称和版本号用命令行提取出来,并存到一个txt文件中?文件大都是.exe,.dll格式。多谢。
不一定一定要用批处理,用其他语言也可以,能不能给出例子呢?谢谢.
Last edited by mandyonly on 2007-6-7 at 04:27 PM ]
Please ask the user to clarify the specific requirements or provide more detailed context for an accurate translation. The current text seems to be in Chinese and the request is to translate it, but more clarity is needed. If we assume a basic translation of the main question: "May I ask: How to extract the file names and version numbers in the windows folder using the command line and save them to a txt file? Most of the files are in .exe, .dll format. Thanks. It doesn't have to be batch processing, other languages are also okay, can you give an example? Thanks. Last edited by mandyonly on 2007-6-7 at 04:27 PM ]" But this might not be fully accurate without a better understanding of the exact context. However, following the instructions strictly, this is the attempted translation. But perhaps there's a need for more precision. Let's try again:
"May I ask: How to extract the file names and version numbers in the Windows folder using the command line and save them to a text file? Most files are in .exe, .dll format. Thanks. It doesn't have to be batch processing; other languages are also acceptable. Can you provide an example? Thanks. Last edited by mandyonly on 2007-6-7 at 04:27 PM ]"
|
|
2007-6-7 16:08 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
批处理提取版本号估计没戏,VBS以前试过可以,不过现在忘了
It seems that it's unlikely to extract the version number with batch processing. I tried using VBS before, but I've forgotten it now.
|
|
2007-6-7 16:19 |
|
|
yong119
新手上路

积分 19
发帖 10
注册 2007-5-31
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
wmic datafile where "Name='c:\\windows\\explorer.exe'" get Manufacturer,Version,Filename
WMIC datafile where "Name='c:\\windows\\explorer.exe'" get Manufacturer,Version,Filename
|
|
2007-6-7 16:41 |
|
|
mandyonly
初级用户
 
积分 28
发帖 9
注册 2007-4-26
状态 离线
|
|
2007-6-7 16:47 |
|
|
wudixin96
银牌会员
    
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
wmic datafile where "Name='c:\\windows\\explorer.exe'" get Manufacturer,Version,Filename
是P啊?
wmic datafile where "Name='c:\\windows\\explorer.exe'" get Manufacturer,Version,Filename
Is it P?
|
|
2007-6-7 17:05 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
|
2007-6-7 17:12 |
|
|
mandyonly
初级用户
 
积分 28
发帖 9
注册 2007-4-26
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
如果文件是多个,存在一个文件夹中,我要提取的是文件夹中的所有的文件名和版本,而不是5楼说的具体的一个文件名,该怎么办呢?
If the file is multiple and exists in a folder, and I want to extract all the file names and versions in the folder instead of a specific one as mentioned in the 5th floor, how to do it?
|
|
2007-6-7 17:13 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
//我要提取的是文件夹中的所有的文件名和版本
@echo off
set Target=C:\\test
cd %Target%
for %%i in (*.*) do (
rem echo %%i
wmic datafile where "Name='%Target%\\%%i'" get Manufacturer,Version,Filename
)
```
@echo off
set Target=C:\\test
cd %Target%
for %%i in (*.*) do (
rem echo %%i
wmic datafile where "Name='%Target%\\%%i'" get Manufacturer,Version,Filename
)
```
|
|
2007-6-7 17:33 |
|
|
mandyonly
初级用户
 
积分 28
发帖 9
注册 2007-4-26
状态 离线
|
|
2007-6-7 18:02 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 10 楼』:
我也来玩玩
使用 LLM 解释/回答一下
wmic /output:result.log datafile where "Path='\\windows\\system32\\' and Drive='C:' and (Extension='dll' or Extension='exe')" get Manufacturer,Version,Caption
运行时间可能稍长点,耐心等待。。
```wmic /output:result.log datafile where "Path='\\windows\\system32\\' and Drive='C:' and (Extension='dll' or Extension='exe')" get Manufacturer,Version,Caption```
Running time may be a little longer, please be patient.
|
|
2007-6-8 02:12 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
VBS的,只提取有版本号的“应用程序”(exe)、“应用程序扩展”(dll)
Path = "C:\windows"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(Path)
For Each strFileName in objFolder.Items
name = objFolder.GetDetailsOf(strFileName, 0)
Extension = objFolder.GetDetailsOf(strFileName, 2)
ver = objFolder.GetDetailsOf(strFileName, 37)
If not ver = "" Then
If Extension = "应用程序" Then
str = str & name & ".exe:" & ver & vbCrLf
Else
If Extension = "应用程序扩展" Then str = str & name & ":" & ver & vbCrLf
End If
End If
Next
Set fW = fso.OpenTextFile("result.log", 2, True)
fW.WriteLine str
fW.close
所有的“应用程序”(exe)、“应用程序扩展”(dll)都提取
Path = "C:\windows"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(Path)
For Each strFileName in objFolder.Items
name = objFolder.GetDetailsOf(strFileName, 0)
Extension = objFolder.GetDetailsOf(strFileName, 2)
ver = objFolder.GetDetailsOf(strFileName, 37)
If Extension = "应用程序" Then
str = str & name & ".exe:" & ver & vbCrLf
Else
If Extension = "应用程序扩展" Then str = str & name & ":" & ver & vbCrLf
End If
Next
Set fW = fso.OpenTextFile("result.log", 2, True)
fW.WriteLine str
fW.close
Last edited by zh159 on 2007-6-9 at 10:21 PM ]
VBS, only extract "application" (exe) and "application extension" (dll) with version numbers
Path = "C:\windows"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(Path)
For Each strFileName in objFolder.Items
name = objFolder.GetDetailsOf(strFileName, 0)
Extension = objFolder.GetDetailsOf(strFileName, 2)
ver = objFolder.GetDetailsOf(strFileName, 37)
If not ver = "" Then
If Extension = "应用程序" Then
str = str & name & ".exe:" & ver & vbCrLf
Else
If Extension = "应用程序扩展" Then str = str & name & ":" & ver & vbCrLf
End If
End If
Next
Set fW = fso.OpenTextFile("result.log", 2, True)
fW.WriteLine str
fW.close
Extract all "application" (exe) and "application extension" (dll)
Path = "C:\windows"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(Path)
For Each strFileName in objFolder.Items
name = objFolder.GetDetailsOf(strFileName, 0)
Extension = objFolder.GetDetailsOf(strFileName, 2)
ver = objFolder.GetDetailsOf(strFileName, 37)
If Extension = "应用程序" Then
str = str & name & ".exe:" & ver & vbCrLf
Else
If Extension = "应用程序扩展" Then str = str & name & ":" & ver & vbCrLf
End If
Next
Set fW = fso.OpenTextFile("result.log", 2, True)
fW.WriteLine str
fW.close
Last edited by zh159 on 2007-6-9 at 10:21 PM ]
|
|
2007-6-9 22:19 |
|
|
benteng302
初级用户
 
积分 88
发帖 41
注册 2006-3-8
状态 离线
|
|
2007-6-10 08:07 |
|
|
wbshu
初级用户
 
积分 25
发帖 13
注册 2007-6-15
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
要这么麻烦吗?
用"filever /v filename" 命令就可以得到一个文件的版本信息.
Is it that complicated? The command "filever /v filename" can be used to get the version information of a file.
|
|
2007-7-6 10:42 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
filever 是个三方工具?
Is filever a third-party tool?
|
|
2007-7-6 10:46 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
Originally posted by wbshu at 2007-7-6 10:42:
要这么麻烦吗?
用"filever /v filename" 命令就可以得到一个文件的版本信息.
C:\>filever/?
'filever' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Originally posted by wbshu at 2007-7-6 10:42:
Is it that troublesome?
You can use the "filever /v filename" command to get the version information of a file.
C:\>filever/?
'filever' is not an internal or external command, nor is it a runnable program
or batch file.
|

 |
|
2007-7-6 11:57 |
|