Performance 剧本需要很长时间

Performance 剧本需要很长时间,performance,batch-file,Performance,Batch File,您好,我有这个脚本: batch.bat: @Echo off SETLOCAL ENABLEDELAYEDEXPANSION for /f "tokens=*" %%g in (files.txt) do ( SET File=%%g ECHO SET SearchStr=!File! > temp1.bat Type temp1.txt >> temp2.bat Start temp2.bat TIMEOUT /t 1 /nobreak > NUL Del temp2

您好,我有这个脚本:

batch.bat:

@Echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=*" %%g in (files.txt) do (
SET File=%%g
ECHO SET SearchStr=!File! > temp1.bat
Type temp1.txt >> temp2.bat
Start temp2.bat
TIMEOUT /t 1 /nobreak > NUL
Del temp2.bat
)

temp1.bat:

findstr "%SearchStr%" paths.txt >> FilePaths.txt
exit

我的“files.txt”中有3000多行,所以大约需要50分钟才能工作,但如果可以更快,效果会更好,你有什么想法可以帮助我吗?

你的问题示例不清楚。您可以尝试:

findstr /ig:files.txt paths.txt > FilePaths.txt

您想让我澄清什么?重定向到
temp1.bat
,但该文件以后从未使用过。