开发者

Help with DOS script (grab specific data from a file)

I need to grab just the md5 value from a file and make it a variable which I can use to compare to a开发者_如何学Cnother md5 value. The problem is this file looks like this:

a7393f772e34ca16a5854e80d9ec6704 md5

How do I open the file and only grab the actual number in DOS? (Not the "md5" And set it as a variable?

Thanks!


There's no way to do that with a batch file on MSDOS. However, an NT/W2K/XP/etc. batch file can do it this way:

for /F "tokens=1" %%A in (md5list.txt) do set result=%%A
echo result is %result%
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜