troubleshooting Question

DOS Batch file: appending variable

Avatar of MADHU_N
MADHU_N asked on
Microsoft DOSWindows XP
2 Comments1 Solution1442 ViewsLast Modified:
Hi all

I am new to DOS Batch files.

I want to get list of files from folder and store in a variable.

Now I am able to display list of files using for loop

set DIR=C:\test
for %%x in (%DIR%\*.*) do echo %%x

But I want store in a variable, the following is static, but I need list of flies should append dynamically.

SET CLASSPATH=C:\test\test.txt;C:\test\test1.txt

Thanks in advance, I need this answer ASAP pls
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros