English 中文(简体)
Help with DOS script (grab specific data from a file)
原标题:
  • 时间:2009-11-14 04:21:13
  •  标签:
  • md5
  • dos

I need to grab just the md5 value from a file and make it a variable which I can use to compare to another 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%
问题回答

暂无回答




相关问题
Compilers for DOS32?

Where can I get BASIC and C/C++ Compilers for MS-DOS?

GUI paradigm history

I know that Apple and Microsoft were inspired by Xerox PARC in building the GUI, but my question is: from the hardware point of view, which was the switch to GUI become available? I remember that I ve ...

Batch File to Delete Folders

I found some code to delete folders, in this case deleting all but n # of folders. I created 10 test folders, plus 1 that was already there. I want to delete all but 4. The code works, it leaves 4 ...

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 another md5 value. The problem is this file looks like this: a7393f772e34ca16a5854e80d9ec6704 md5 ...

DOS Database - help needed to recognize what is it

today I got a copy of an old system from which I need to import data. The system is written in C and runs in DOS. It uses some kind of database. The file format seems to be rather simple(1 file = 1 ...

View ram in DOS

Is there a way in dos (im using a dos boot disk on a linux machine) to view portions of ram? ie. some form of command to read the binary at a given address? edit: my bootable floppy doesnt have ...

Lynx removes newline characters from post_data input

I am trying to post a file to a URL via the MS-DOS command prompt. I am using the Lynx browser to do this. I am able to post my file just fine, but all of the newline characters are removed by Lynx ...

热门标签