Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Build up variables using DOS
Name: fasshack (by 1234) Date: July 12, 2005 at 13:18:40 Pacific OS: XP Pro CPU/Ram: 1.5GB/1GB
Comment:
Trying to build up a variable based on the contents of a directory. For Java inclined, I want to add all of the *.jar files, of a given directory, to the CLASSPATH. I tried this:
set CLP=. for %%x in (C:\{some-dir}\*.jar) do set CLP=%%x;%CLP%
but it only counts the last iteration of the loop (i.e. the last file in the list).
This is not a DOS question, so you are posting on the wrong Forum; however here the solution that implues to enable the XP batch "delayed expansion of variables"
SetLocal EnableDelayedExpansion set CLP=. for %%x in (C:\{some-dir}\*.jar) do set CLP=%%x;!CLP! EndLocal
Summary: Someone gave me a computer, it hadn't been working right (possibly had a trojan) and they bought a new one. That's why I'm not sure of the RAM (64 I think). I also found it had 2 hd in it, something I...
Summary: I'm getting an MS Explorer "Illegal Operation" message when I try to boot up into WIN98 (safe or normal mode). It will boot up into Dos however. Computer software manuf. guy says my hard drive needs t...
Summary: Certain original dos programs will not run properly or at all, using the embedded dos versions supplied as part of windows. This may well be true when using an old fortran program. You just have to ru...