1.

Solve : how to read the contents of a file and supply to an executable?

Answer»

Hi,

I am not familiar with DOS commands.

I am trying to read the CONTENTS of a FILE and supply to an executable. So, I want to essentially do the UNIX equivalent on windows

java -cp `cat classpath.txt'

Thanks
SivaI WOULD to know how to use command "type filename.txt" and supply the contents as an ARGUMENT to a program on the command line.

Thanks
SivaThis seems to work

for /f %%a in (classpath.txt) do (
java -cp %%a
)




Discussion

No Comment Found