Avatar of MADHU_N
MADHU_N

asked on 

DOS Batch file: appending variable

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
Microsoft DOSWindows XP

Avatar of undefined
Last Comment
sirbounty
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sirbounty
sirbounty
Flag of United States of America image

Hmm - what more did you need for an "A"? : \
Windows XP
Windows XP

Microsoft Windows XP is the sixth release of the NT series of operating systems, and was the first to be marketed in a variety of editions: XP Home and XP Professional, designed for business and power users. The advanced features in XP Professional are generally disabled in Home Edition, but are there and can be activated. There were two 64-bit editions, an embedded edition and a tablet edition.

119K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo