Assuming 'paths' is a file containing all the paths I need to write to the environment variable CLASSPATH
, appended in the right format. I essentially need Windows equivalent of
CLASSPATH=$(cat paths)
In accordance with this answer I tried doing the below:
for /f "delims=" %A in ('cat paths.txt') do @set CLASSPATH=%A
(paths.txt has all the paths in the right format) but it does not work. Echoing '%CLASSPATH%' still gives me nothing. What am I doing wrong?