Jump to content

Recommended Posts

Posted

Hi,

I don't know much about batch files but I need one to get a program's output and extract something...

the program is mdiskchk witch outputs this:

Drive 00 is MEMDISK 2.08:

    Address = 0x03d60000, len = 2880 sectors, chs = 80/2/18

    Cmdline = BOOT_IMAGE=/BOOT/modules/mdisk initrd=/utils/img/floppy.img run=/utils/bin/fprot.exe

and I need to extract the string "/utils/bin/fprot.exe" from it...

I've found some technics like this one:

Search for unknown string, with known first word in output, using a temporary batch file:

    NET USE ¦ FIND "X:" > TEMP.BAT

    >> OK.BAT ECHO SET UNC=%%2

    CALL TEMP.BAT

    IF NOT "%UNC%"=="" ECHO UNC for drive X: is %UNC%

but I don't have write acess to a drive so I can't create a TEMP.BAt...

Anyone have an idea??? Thank you very much!!!!!!!!! :)


Posted

Hum...

I must admit I really don't understand a thing about tokens and for and delims and others...

What should it be???

thank you very much...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...