Pregunta

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?

¿Fue útil?

Solución 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
)

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top