- 帖子
- 4
- 积分
- 16
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2018-2-28
|
本帖最后由 xuzx 于 2018-2-28 18:01 编辑
hostname>c:\hn.txt
(set/p a=) < c:\hn.txt
wmic memorychip>>c:\%a%.txt
del /q c:\hn.txt
上面是本人写的批处理,主要是抓取内存主频并把本机计算机名作为文件名。
BankLabel Capacity Caption CreationClassName DataWidth Description DeviceLocator FormFactor HotSwappable InstallDate InterleaveDataDepth InterleavePosition Manufacturer MemoryType Model Name OtherIdentifyingInfo PartNumber PositionInRow PoweredOn Removable Replaceable SerialNumber SKU Speed Status Tag TotalWidth TypeDetail Version
BANK 1 8589934592 Physical Memory Win32_PhysicalMemory 64 Physical Memory ChannelA-DIMM1 8 0 0 Samsung 0 Physical Memory M378B1G73EB0-YK0 14BC1E32 1600 Physical Memory 1 64 128
以上是运行批处理之后的内容,现在希望能抓取 Physical Memory前的1600 添加到上面生成的文件a,作为文件名。注:需要保留计算机名。
麻烦各路大神求救求救!!!!! |
|