Advertisement

03.04.2007 at 11:09PM PST, ID: 22427601
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

DOS Batch files :  looping

Asked by MADHU_N in Windows Batch Scripting, MS DOS

Tags: , , ,

Hi All

The following code I got from Genius when I asked question its working fine get ,stores list of files from folders in a variable but now there is another requirement.  I am not familiar with Batch files.


set myDir1=C:\test1
set myDir2=c:\test2
set classpath=


for /f "delims=" %%a in ('dir %myDir1% /b /a-d') do call :process1 %%a
goto :next

:process1
pause
if "%classpath%"=="" set classpath=%mydir1%\%1& goto :end
set classpath=%classpath%;%mydir1%\%1
goto :end

:next
for /f "delims=" %%a in ('dir %myDir2% /b /a-d') do call :process2 %%a
goto :end

:process2
set classpath=%classpath%;%mydir2%\%1
goto :end
:end

for loop is executing below the statements every time, what I need is it should not execute statements
-----------------------------------------------------------------------------------------------------------------------------
every time. I   need loop should store list of files from folders in a variable, once list of files stored in
----------------------------------------------------------------------------------------------------------------------------
variable then it   should execute following statements.  
-----------------------------------------------------------------


SET COMMAND=java -D%PROPERTIESS% -cp %CLASSPATH% %CLASS% %ARGUMENTS%

%COMMAND%

Thanks in advance and thank for previous answers .
Start Free Trial
[+][-]03.05.2007 at 12:50AM PST, ID: 18653169

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Batch Scripting, MS DOS
Tags: batch, dos, loop, files
Sign Up Now!
Solution Provided By: dragon-it
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32