20041119.WindowsXP-KB886677-x86-chs.exe
The above is a file name, and there are multiple such file names, but they are not completely regular.
Now, we need to obtain the 8-character string starting with kb, that is, kb******......
The following are the purpose requirements I want to achieve:
1. A text file contains the following content:
20041119.WindowsXP-KB886677-x86-chs.exe
windowsmedia-KB885836-x86-CHS.exe
Windows-KB890830-V1.34.exe
KB939653.exe
2. The batch processing commands to be done are:
20041119.WindowsXP-KB886677-x86-chs.exe /x:.\kb886677
20041213.WindowsXP-KB873339-x86-CHS.exe /x:.\kb873339
windowsmedia-KB885836-x86-CHS.exe /x:.\KB885836
Windows-KB890830-V1.34.exe /x:.\KB890830
KB939653.exe /x:.\KB939653
3. Please help brothers write a batch processing:
for /f "tokens=1" %%i in (hotfix.txt) do (
@echo 正在提取 Windows XP 更新 %%i && @(%%i /x:.\***Here I don't know how to extract the KB directory name***)
)
Please give me some advice, big brother!!!!
[ Last edited by nghr on 2007-10-21 at 12:43 PM ]
The above is a file name, and there are multiple such file names, but they are not completely regular.
Now, we need to obtain the 8-character string starting with kb, that is, kb******......
The following are the purpose requirements I want to achieve:
1. A text file contains the following content:
20041119.WindowsXP-KB886677-x86-chs.exe
windowsmedia-KB885836-x86-CHS.exe
Windows-KB890830-V1.34.exe
KB939653.exe
2. The batch processing commands to be done are:
20041119.WindowsXP-KB886677-x86-chs.exe /x:.\kb886677
20041213.WindowsXP-KB873339-x86-CHS.exe /x:.\kb873339
windowsmedia-KB885836-x86-CHS.exe /x:.\KB885836
Windows-KB890830-V1.34.exe /x:.\KB890830
KB939653.exe /x:.\KB939653
3. Please help brothers write a batch processing:
for /f "tokens=1" %%i in (hotfix.txt) do (
@echo 正在提取 Windows XP 更新 %%i && @(%%i /x:.\***Here I don't know how to extract the KB directory name***)
)
Please give me some advice, big brother!!!!
[ Last edited by nghr on 2007-10-21 at 12:43 PM ]

