Frage

I want to check whether all my dlls and libs within a project were built for x64 using

dumpbin /headers *.obj | findstr machine

which outputs a list of e.g. 8664 machine (x64). How can I print the filename for each listed file? Or do I have to extract filenames into a separate textfile before to go with a for loop?

War es hilfreich?

Lösung 2

After a long look I found the solution for my problem

FOR /F %i IN ('DIR /B 2^>nul *.obj') DO (
    echo | set /P=%i:
    dumpbin /headers %i | findstr machine
)

Andere Tipps

dumpbin /headers *.obj | findstr "machine Dump" will print the "Dump of file ...." line and the machine type line.

From the findstr help

Use spaces to separate multiple search strings unless the argument is prefixed with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top