<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-13994</id>
	<title>Nabble - Batch World</title>
	<updated>2009-10-14T07:36:00Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Batch-World-f13994.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Batch-World-f13994.html" />
	<subtitle type="html">Batch World is an interactive mailing list whose members exchange ideas and offer help on batch file issues of all kinds. Batch programmers and enthusiasts are welcome to participate in this forum which focuses on ideas surrounding the workings and practical usage of batch files under MSDOS, PCDOS, DRDOS, Novell DOS, FreeDOS, OpenDOS, 4DOS, OS/2, WinNT, Win3.x, Win95/98/ME/XP/2000, and any other operating systems where the batch language can be applied.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-25892283</id>
	<title>SED Question</title>
	<published>2009-10-14T07:36:00Z</published>
	<updated>2009-10-14T07:36:00Z</updated>
	<author>
		<name>henter2009</name>
	</author>
	<content type="html">I have the following question about sed and methacaracters:
&lt;br&gt;&lt;br&gt;In the eg number 1, I escaped the +, to get any matches with 1 plus (1 or more characters)
&lt;br&gt;In the eg number 2, I escaped the *, to get any matches with 0 or more characters, but it scape the * and takes it at literal.
&lt;br&gt;&lt;br&gt;Why it doesn't take + literal as well?
&lt;br&gt;How does it really works?
&lt;br&gt;Any help?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;1.) sed -ne '/t\+/Ip'
&lt;br&gt;&lt;br&gt;tango
&lt;br&gt;tango &amp;nbsp; &amp;gt; repeated
&lt;br&gt;balada &amp;nbsp;&amp;gt; non repeated
&lt;br&gt;&lt;br&gt;&lt;br&gt;2.) sed -ne '/t\*/Ip'
&lt;br&gt;&lt;br&gt;t8
&lt;br&gt;t*
&lt;br&gt;t* &lt;div class=&quot;signature&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _
&lt;br&gt;ASCII ribbon campaign &amp;nbsp; ( )
&lt;br&gt;&amp;nbsp;against HTML e-mail &amp;nbsp; &amp;nbsp; &amp;nbsp;X
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/ \&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SED-Question-tp25892283p25892283.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25586175</id>
	<title>Re: Get my parameters from a txt file</title>
	<published>2009-09-24T13:38:58Z</published>
	<updated>2009-09-24T13:38:58Z</updated>
	<author>
		<name>SCMBUILD</name>
	</author>
	<content type="html">Hi all ,
&lt;br&gt;&lt;br&gt;I am Trying to pass the parameter from the batch file
&lt;br&gt;&lt;br&gt;Here is the process i am following 
&lt;br&gt;&lt;br&gt;batchinput.txt
&lt;br&gt;--------------
&lt;br&gt;FD1 FL1
&lt;br&gt;FD2 FL2
&lt;br&gt;FD3 FL3
&lt;br&gt;FD4 FL4
&lt;br&gt;FD5 FL5
&lt;br&gt;FD6 FL6
&lt;br&gt;FD7 FL7
&lt;br&gt;&lt;br&gt;&lt;br&gt;my batch file
&lt;br&gt;&lt;br&gt;cpy.bat
&lt;br&gt;-------
&lt;br&gt;@echo off 
&lt;br&gt;setlocal 
&lt;br&gt;set IMPORTFILE=C:\batchinput.txt
&lt;br&gt;&lt;br&gt;for /f %%a IN (%IMPORTFILE%) do ( 
&lt;br&gt;&amp;nbsp; call :PROCESS &amp;nbsp;
&lt;br&gt;&amp;nbsp; )
&lt;br&gt;&lt;br&gt;:PROCESS &amp;nbsp;
&lt;br&gt;echo &amp;quot;%%a&amp;quot;
&lt;br&gt;copy &amp;quot;C:\Documents and Settings\bhattu\Desktop\TST\%1\%2\*.txt&amp;quot; &amp;quot;C:\Documents and Settings\bhattu\Desktop\TSTFD\%1\%2\*.txt&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;The out put from the batchile is 
&lt;br&gt;&lt;br&gt;C:\Documents and Settings\bhattu&amp;gt;for.bat
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&amp;quot;%a&amp;quot;
&lt;br&gt;The system cannot find the file specified.
&lt;br&gt;&lt;br&gt;&lt;br&gt;but i want to pass the %1 as the FD1 - FD7 and %2 as FL1 - FL7 so that it will copy all the text files in the respective folders
&lt;br&gt;&lt;br&gt;when i am echoing the %%a value it is showing the %a instead of the values in the text file.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;when i am trying in the following way it is echoing the values correctly.
&lt;br&gt;&lt;br&gt;cpy1.bat
&lt;br&gt;--------
&lt;br&gt;@echo off 
&lt;br&gt;setlocal 
&lt;br&gt;set IMPORTFILE=C:\batchinput.txt 
&lt;br&gt;&lt;br&gt;FOR /f %%a in (%IMPORTFILE%) do echo &amp;quot;%%a&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;the output is
&lt;br&gt;-------------
&lt;br&gt;FD1 FL1
&lt;br&gt;FD2 FL2
&lt;br&gt;FD3 FL3
&lt;br&gt;FD4 FL4
&lt;br&gt;FD5 FL5
&lt;br&gt;FD6 FL6
&lt;br&gt;FD7 FL7
&lt;br&gt;&lt;br&gt;&lt;br&gt;Can you please help me how can i pass the %1 and %2 values to batch file from the text file.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Get-my-parameters-from-a-txt-file-tp19966113p25586175.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25218565</id>
	<title>BATCHWORLD has closed - you are invited to join Batchworld Mk II</title>
	<published>2009-08-30T22:38:41Z</published>
	<updated>2009-08-30T22:38:41Z</updated>
	<author>
		<name>foxidrive-7</name>
	</author>
	<content type="html">&lt;br&gt;Batchworld MkII continues the good work of the Batch World group, where the
&lt;br&gt;moderator has disappeared and locked the group.
&lt;br&gt;&lt;br&gt;I am the moderator of the new &amp;quot;Batchworld MkII&amp;quot; using the name of procyon50
&lt;br&gt;and Batchworld MkII is currently open to all users, without moderation.
&lt;br&gt;&lt;br&gt;I you enjoy scripting then please join me there, the more the merrier. :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I have reused the Batch World description: Batchworld MKII is an
&lt;br&gt;interactive mailing list whose members exchange ideas and offer help on
&lt;br&gt;batch file issues of all kinds. Batch programmers and enthusiasts are
&lt;br&gt;welcome to participate in this forum which focuses on ideas surrounding the
&lt;br&gt;workings and practical usage of batch files under MSDOS, PCDOS, DRDOS,
&lt;br&gt;Novell DOS, FreeDOS, OpenDOS, 4DOS, OS/2, WinNT, Win3.x,
&lt;br&gt;Win95/98/ME/XP/2000, and any other operating systems where the batch
&lt;br&gt;language can be applied.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://tech.groups.yahoo.com/group/Batchworld_Mark2/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tech.groups.yahoo.com/group/Batchworld_Mark2/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/BATCHWORLD-has-closed---you-are-invited-to-join-Batchworld-Mk-II-tp25218565p25218565.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25183989</id>
	<title>ANSWER: Re: robocopy /MIR keeps copying NEWER</title>
	<published>2009-08-27T21:52:16Z</published>
	<updated>2009-08-27T21:52:16Z</updated>
	<author>
		<name>bslasch</name>
	</author>
	<content type="html">Just to let you know you have encountered a defect in your nas product, Windows OS from 2000 on employ a time stamp with a 64 bit value, some samba based NAS devices run an older samba code base that can return a 32 bit or 64 bit timestamp depending on the smb call done.
&lt;br&gt;&lt;br&gt;Robocopy and the windows host are expecting a 64 bit timestamp and your NAS device returned a 32 bit value.
&lt;br&gt;&lt;br&gt;If you have support on this device I would open a ticket with your vendor as they have a defect in their product causing you needless pain.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25183989&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;, &amp;quot;umayxa3&amp;quot; &amp;lt;umayxa3@...&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think I found my answer:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ~=~=~=~=~=~=~=~=~=~=~=~=~
&lt;br&gt;&amp;gt; @echo off
&lt;br&gt;&amp;gt; if NOT %~z1 == %~z2 ( echo DO NOTHING ) ELSE ( echo DO ROBOCOPY )
&lt;br&gt;&amp;gt; ~=~=~=~=~=~=~=~=~=~=~=~=~
&lt;br&gt;&amp;gt; I'll obviously change the &amp;quot;echo&amp;quot; to my Robocopy script.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I then call it like this:
&lt;br&gt;&amp;gt; &amp;gt;docopy.bat C:\my_local_pst_file.pst L:\my_remote_pst_file.pst
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If they have the same file size, do nothing. If they are different,
&lt;br&gt;&amp;gt; kick off the Robocopy script.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'll be testing this at work today and follow up if this doesn't work.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -Allen
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25183989&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;, &amp;quot;umayxa3&amp;quot; &amp;lt;umayxa3@&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; We have a NAS that users are allowed to store extra data to.
&lt;br&gt;&amp;gt; &amp;gt; I am doing backups of my PST files to my network share using:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;robocopy &amp;lt;source&amp;gt; &amp;lt;destination&amp;gt; /MIR
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; EVERY time I run this, even if there is no change in the files, it sees 
&lt;br&gt;&amp;gt; &amp;gt; the source as being NEWER and copies the files over.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I'll assume this is because our NAS is strange (long story). The NAS 
&lt;br&gt;&amp;gt; &amp;gt; may have a time difference or not allowing perameters copied that 
&lt;br&gt;&amp;gt; &amp;gt; tells &amp;quot;newer&amp;quot;.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; To work around this, I want to ONLY COPY if the file sizes are 
&lt;br&gt;&amp;gt; &amp;gt; different.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I can't seem to figure this out. How do I tell robocopy to ONLY COPY if 
&lt;br&gt;&amp;gt; &amp;gt; the file sizes between source and destination are different?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Thanks,
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; -Allen
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/robocopy--MIR-keeps-copying-NEWER-tp19614337p25183989.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25166050</id>
	<title>Re: Re: robocopy /MIR keeps copying NEWER</title>
	<published>2009-08-26T21:33:31Z</published>
	<updated>2009-08-26T21:33:31Z</updated>
	<author>
		<name>Parag P. Doke</name>
	</author>
	<content type="html">Hello Omer.Try something on the lines of:
&lt;br&gt;type PrintMe.txt &amp;gt;&amp;gt; prn
&lt;br&gt;Where you need to print the entire contents of the file directly. However,
&lt;br&gt;if you wish to print something like the rendered html file, this will not
&lt;br&gt;work (it is expected to print the html source instead).
&lt;br&gt;&lt;br&gt;Parag P. Doke
&lt;br&gt;&lt;a href=&quot;http://paragpdoke.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://paragpdoke.blogspot.com&lt;/a&gt;&lt;br&gt;Save paper, save trees. Do not print emails/documents unless absolutely
&lt;br&gt;necessary.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Aug 27, 2009 at 9:13 AM, Omer Mohammed &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25166050&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;omer_161@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is my first email in this group. even though i got lots of usefull
&lt;br&gt;&amp;gt; resources from this group, but recently getting into the batch files.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; at the moment i need a script that can print to a local printer and as well
&lt;br&gt;&amp;gt; to a network printer that has ipp protocol.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help would be greatly appreciated
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/robocopy--MIR-keeps-copying-NEWER-tp19614337p25166050.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25165723</id>
	<title>RE: Re: robocopy /MIR keeps copying NEWER</title>
	<published>2009-08-26T20:43:01Z</published>
	<updated>2009-08-26T20:43:01Z</updated>
	<author>
		<name>Omer Mohammed</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi All,
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;This is my first email in this group. even though i got lots of usefull resources from this group, but recently getting into the batch files. 
&lt;br&gt;&lt;br&gt;at the moment i need a script that can print to a local printer and as well to a network printer that has ipp protocol.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Any help would be greatly appreciated 
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks 
&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/robocopy--MIR-keeps-copying-NEWER-tp19614337p25165723.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24975225</id>
	<title>Create batch file</title>
	<published>2009-08-14T10:06:47Z</published>
	<updated>2009-08-15T19:33:10Z</updated>
	<author>
		<name>yohayon</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I'm looking for someone to generate a batch file which:
&lt;br&gt;1) runs a command (example: copy)
&lt;br&gt;2) If this command successfully completes then it should run another command (example: delete)
&lt;br&gt;3) If this command 1 (copy) is NOT successful then it should broadcast a message to the user's computer via net send saying &amp;quot;error encountered deleting &amp;quot;%filename%&amp;quot;&amp;quot; &amp; not continue with command 2
&lt;br&gt;&lt;br&gt;I have spent hours trying to do this but have failed miserably!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Create-batch-file-tp24975225p24975225.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24947218</id>
	<title>Re: progress bar</title>
	<published>2009-08-12T18:00:46Z</published>
	<updated>2009-08-12T18:00:46Z</updated>
	<author>
		<name>Theodorik OBroin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Cheers to Josh for his link.
&lt;br&gt;&lt;br&gt;&amp;nbsp; I've taken the batch file listed there, and together with your script,
&lt;br&gt;have created a different script.
&lt;br&gt;&amp;nbsp; I dunno about you, but when I ran the batch file listed in Josh's link, it
&lt;br&gt;didn't do the backspace for me.
&lt;br&gt;&lt;br&gt;&amp;nbsp; I chose this, as I found the flaw in my program. &amp;nbsp;It would only rotate
&lt;br&gt;when it was not installing something, which wasn't what you wanted.
&lt;br&gt;&amp;nbsp; This program does what I would have done, except it works.
&lt;br&gt;&lt;br&gt;&amp;nbsp; The only prerequisite is that you have the .net framework and textpad
&lt;br&gt;installers in the same directory as the batch file.
&lt;br&gt;&lt;br&gt;&amp;nbsp; I have only tested it with the &amp;quot;notepad&amp;quot;, and what I see is that while
&lt;br&gt;notepad is open, the spinner works. :o)
&lt;br&gt;&amp;nbsp; Just close each notepad to see the program advance.
&lt;br&gt;&lt;br&gt;:: begin Net-Textpad-Installer.cmd
&lt;br&gt;@echo off
&lt;br&gt;&lt;br&gt;:: Localise environment.
&lt;br&gt;setlocal
&lt;br&gt;cls
&lt;br&gt;&lt;br&gt;:: Specify directories. Your current working directory is used
&lt;br&gt;:: to create temporary files tmp_*.*
&lt;br&gt;set wkdir=%~dp0%
&lt;br&gt;:: For testing, uncomment the next line to show what the above line does
&lt;br&gt;:: echo %wkdir%
&lt;br&gt;set wkdir=%wkdir:~0,-1%
&lt;br&gt;:: For testing, uncomment the next line to show what the above line does
&lt;br&gt;:: echo %wkdir%
&lt;br&gt;&lt;br&gt;:: First pass, Installing .Net Framework
&lt;br&gt;:: Use Last to find out if this is the last program to install
&lt;br&gt;set Last=0
&lt;br&gt;del &amp;quot;%wkdir%\tmp_*.*&amp;quot; 2&amp;gt;nul
&lt;br&gt;echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; dotnetfx35.exe /qb /norestart
&lt;br&gt;:: For testing, comment out the above line, and uncomment the line below
&lt;br&gt;:: echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; notepad
&lt;br&gt;echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; del &amp;quot;%wkdir%\tmp_payload.flg&amp;quot;
&lt;br&gt;:: On the next line, I removed the numerical value at the end with the app
&lt;br&gt;being installed, so as to inform the user
&lt;br&gt;call :monitor &amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; &amp;quot;%wkdir%\tmp_payload.flg&amp;quot; .Net
&lt;br&gt;Framework
&lt;br&gt;&lt;br&gt;:: Second pass, Installing Textpad
&lt;br&gt;:: This is the last program to be installed, so FIN! will appear in the
&lt;br&gt;title
&lt;br&gt;set Last=1
&lt;br&gt;del &amp;quot;%wkdir%\tmp_*.*&amp;quot; 2&amp;gt;nul:
&lt;br&gt;echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; TextPad 5.msi /qb
&lt;br&gt;:: For testing, comment out the above line, and uncomment the line below
&lt;br&gt;:: echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; notepad
&lt;br&gt;echo &amp;gt;&amp;gt;&amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; del &amp;quot;%wkdir%\tmp_payload.flg&amp;quot;
&lt;br&gt;:: On the next line, I removed the numerical value at the end with the app
&lt;br&gt;being installed, so as to inform the user
&lt;br&gt;call :monitor &amp;quot;%wkdir%\tmp_payload.cmd&amp;quot; &amp;quot;%wkdir%\tmp_payload.flg&amp;quot; Textpad
&lt;br&gt;&lt;br&gt;goto :final
&lt;br&gt;&lt;br&gt;:monitor
&lt;br&gt;&amp;nbsp; &amp;nbsp; :: Create flag file and start the payload minimized.
&lt;br&gt;&amp;nbsp; &amp;nbsp; echo &amp;gt;&amp;gt;%2 dummy
&lt;br&gt;&amp;nbsp; &amp;nbsp; start /min cmd.exe /c &amp;quot;%1&amp;quot;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; :: Start monitoring.
&lt;br&gt;&amp;nbsp; &amp;nbsp; :: &amp;nbsp; &amp;nbsp;i is the indicator (0=|,1=/,2=-,3=\).
&lt;br&gt;&amp;nbsp; &amp;nbsp; set i=0
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; :: Loop here awaiting completion.
&lt;br&gt;&amp;nbsp; &amp;nbsp; :loop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: Wait one second.
&lt;br&gt;:: For a fast spinner, use -n 1
&lt;br&gt;:: For a slow spinner, use -n 2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ping 127.0.0.1 -n 1 &amp;gt;nul
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: Update counters and output progress indicator.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set /a &amp;quot;i = i + 1&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %i% equ 4 set i=0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %i% equ 0 &amp;lt;nul (title Installing %3 %4 &amp;quot;|&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %i% equ 1 &amp;lt;nul (title Installing %3 %4 &amp;quot;/&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %i% equ 2 &amp;lt;nul (title Installing %3 %4 &amp;quot;-&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %i% equ 3 &amp;lt;nul (title Installing %3 %4 &amp;quot;\&amp;quot;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: End conditions, wait until application finished installing.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not exist %2 (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo. &amp;nbsp; %3 %4 Installed.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %Last% equ 1 (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title FIN!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; del &amp;quot;%wkdir%\tmp_*.*&amp;quot; 2&amp;gt;nul
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto :final
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto :loop
&lt;br&gt;:final
&lt;br&gt;endlocal
&lt;br&gt;&lt;br&gt;:: end Net-Textpad-Installer.cmd
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/8/12 Aristos Vasiliou &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24947218&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for your reply. This is my batch file so far.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @ECHO off
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; title Installing Software
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO Instaling Net Framework
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; dotnetfx35.exe /qb /norestart
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO Instaling TextPad
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; TextPad 5.msi /qb
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ECHO All Software Installed
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; EXIT
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How do I integrate your batch file with mine?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24947218&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt; &amp;lt;batchworld%40yahoogroups.com&amp;gt; [mailto:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24947218&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt; &amp;lt;batchworld%40yahoogroups.com&amp;gt;] On
&lt;br&gt;&amp;gt; Behalf Of Theodorik OBroin
&lt;br&gt;&amp;gt; Sent: Wednesday, August 12, 2009 7:46 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24947218&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt; &amp;lt;batchworld%40yahoogroups.com&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [BATCH WORLD] progress bar
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers for getting me to look at this again.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I find the easiest way is to update the title - that way you don't have
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; do a CLS all the time.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The reason for the two lines of ping -n, is that it's quicker for ping
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; do a double ping of a second each, versus a single ping of two seconds.
&lt;br&gt;&amp;gt; Try it out for yourself.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Let me know how you get on :o)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's my version thus far:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; :: begin spin.cmd
&lt;br&gt;&amp;gt; @echo off
&lt;br&gt;&amp;gt; setlocal
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; set COUNT=0
&lt;br&gt;&amp;gt; set MAXCOUNT=10
&lt;br&gt;&amp;gt; set SECONDS=1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; :LOOP
&lt;br&gt;&amp;gt; title &amp;quot;\&amp;quot;
&lt;br&gt;&amp;gt; call :WAIT
&lt;br&gt;&amp;gt; title &amp;quot;|&amp;quot;
&lt;br&gt;&amp;gt; call :WAIT
&lt;br&gt;&amp;gt; title &amp;quot;/&amp;quot;
&lt;br&gt;&amp;gt; call :WAIT
&lt;br&gt;&amp;gt; title &amp;quot;-&amp;quot;
&lt;br&gt;&amp;gt; if /i &amp;quot;%COUNT%&amp;quot; equ &amp;quot;%MAXCOUNT%&amp;quot; goto :EXIT
&lt;br&gt;&amp;gt; set /a count+=1
&lt;br&gt;&amp;gt; echo %COUNT%
&lt;br&gt;&amp;gt; goto :LOOP
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; :WAIT
&lt;br&gt;&amp;gt; ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;&amp;gt; ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;&amp;gt; goto :EOF
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; :EXIT
&lt;br&gt;&amp;gt; title FIN!
&lt;br&gt;&amp;gt; endlocal
&lt;br&gt;&amp;gt; :: end spin.cmd
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2009/8/12 Aristos Vasiliou &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24947218&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt; &amp;lt;aristos%40aristos.net&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;mailto:aristos%40aristos.net &amp;lt;aristos%2540aristos.net&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Is there a way to add some kind of progress indicator in a batch file?
&lt;br&gt;&amp;gt; &amp;gt; Maybe stars, or something going like this \|/-\|/- You know something
&lt;br&gt;&amp;gt; like a
&lt;br&gt;&amp;gt; &amp;gt; spinning line.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; It doesn't have to be exact, just something showing the user that
&lt;br&gt;&amp;gt; things
&lt;br&gt;&amp;gt; &amp;gt; are moving. I want to use this while installing programs using a batch
&lt;br&gt;&amp;gt; file.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Thanks
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; __________ Information from ESET NOD32 Antivirus, version of virus
&lt;br&gt;&amp;gt; signature database 4329 (20090812) __________
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The message was checked by ESET NOD32 Antivirus.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.eset.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eset.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; __________ Information from ESET NOD32 Antivirus, version of virus
&lt;br&gt;&amp;gt; signature database 4330 (20090812) __________
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The message was checked by ESET NOD32 Antivirus.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.eset.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eset.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24947218.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24943531</id>
	<title>RE: progress bar</title>
	<published>2009-08-12T12:57:12Z</published>
	<updated>2009-08-12T12:57:12Z</updated>
	<author>
		<name>Aristos M. Vasiliou</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks for your reply. This is my batch file so far.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;@ECHO off
&lt;br&gt;&lt;br&gt;title Installing Software
&lt;br&gt;&lt;br&gt;ECHO.
&lt;br&gt;&lt;br&gt;ECHO Instaling Net Framework
&lt;br&gt;&lt;br&gt;dotnetfx35.exe /qb /norestart
&lt;br&gt;&lt;br&gt;ECHO.
&lt;br&gt;&lt;br&gt;ECHO Instaling TextPad
&lt;br&gt;&lt;br&gt;TextPad 5.msi /qb
&lt;br&gt;&lt;br&gt;ECHO.
&lt;br&gt;&lt;br&gt;ECHO All Software Installed
&lt;br&gt;&lt;br&gt;EXIT
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;How do I integrate your batch file with mine?
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24943531&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24943531&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;] On
&lt;br&gt;Behalf Of Theodorik OBroin
&lt;br&gt;Sent: Wednesday, August 12, 2009 7:46 PM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24943531&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [BATCH WORLD] progress bar
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;Cheers for getting me to look at this again.
&lt;br&gt;&lt;br&gt;I find the easiest way is to update the title - that way you don't have
&lt;br&gt;to
&lt;br&gt;do a CLS all the time.
&lt;br&gt;&lt;br&gt;The reason for the two lines of ping -n, is that it's quicker for ping
&lt;br&gt;to
&lt;br&gt;do a double ping of a second each, versus a single ping of two seconds.
&lt;br&gt;Try it out for yourself.
&lt;br&gt;&lt;br&gt;Let me know how you get on :o)
&lt;br&gt;&lt;br&gt;Here's my version thus far:
&lt;br&gt;&lt;br&gt;:: begin spin.cmd
&lt;br&gt;@echo off
&lt;br&gt;setlocal
&lt;br&gt;&lt;br&gt;set COUNT=0
&lt;br&gt;set MAXCOUNT=10
&lt;br&gt;set SECONDS=1
&lt;br&gt;&lt;br&gt;:LOOP
&lt;br&gt;title &amp;quot;\&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;|&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;/&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;-&amp;quot;
&lt;br&gt;if /i &amp;quot;%COUNT%&amp;quot; equ &amp;quot;%MAXCOUNT%&amp;quot; goto :EXIT
&lt;br&gt;set /a count+=1
&lt;br&gt;echo %COUNT%
&lt;br&gt;goto :LOOP
&lt;br&gt;&lt;br&gt;:WAIT
&lt;br&gt;ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:EXIT
&lt;br&gt;title FIN!
&lt;br&gt;endlocal
&lt;br&gt;:: end spin.cmd
&lt;br&gt;&lt;br&gt;2009/8/12 Aristos Vasiliou &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24943531&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt;
&lt;br&gt;&amp;lt;mailto:aristos%40aristos.net&amp;gt; &amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a way to add some kind of progress indicator in a batch file?
&lt;br&gt;&amp;gt; Maybe stars, or something going like this \|/-\|/- You know something
&lt;br&gt;like a
&lt;br&gt;&amp;gt; spinning line.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It doesn't have to be exact, just something showing the user that
&lt;br&gt;things
&lt;br&gt;&amp;gt; are moving. I want to use this while installing programs using a batch
&lt;br&gt;file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;__________ Information from ESET NOD32 Antivirus, version of virus
&lt;br&gt;signature database 4329 (20090812) __________
&lt;br&gt;&lt;br&gt;The message was checked by ESET NOD32 Antivirus.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.eset.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eset.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;__________ Information from ESET NOD32 Antivirus, version of virus
&lt;br&gt;signature database 4330 (20090812) __________
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;The message was checked by ESET NOD32 Antivirus.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.eset.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eset.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24943531.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24940965</id>
	<title>Re: progress bar</title>
	<published>2009-08-12T10:11:51Z</published>
	<updated>2009-08-12T10:11:51Z</updated>
	<author>
		<name>Josh Fitzgerald</name>
	</author>
	<content type="html">&lt;br&gt;Check out this post on stack overflow:
&lt;br&gt;&lt;br&gt;How to code a spinner for waiting processes in a batch file?
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://stackoverflow.com/questions/368041/how-to-code-a-spinner-for-wai&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://stackoverflow.com/questions/368041/how-to-code-a-spinner-for-wai&lt;/a&gt;\
&lt;br&gt;ting-processes-in-a-batch-file/&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--- In &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24940965&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;, &amp;quot;Aristos Vasiliou&amp;quot; &amp;lt;aristos@...&amp;gt;
&lt;br&gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a way to add some kind of progress indicator in a batch file?
&lt;br&gt;Maybe stars, or something going like this \|/-\|/- You know something
&lt;br&gt;like a spinning line.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It doesn't have to be exact, just something showing the user that
&lt;br&gt;things are moving. I want to use this while installing programs using a
&lt;br&gt;batch file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24940965.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24940541</id>
	<title>Re: progress bar</title>
	<published>2009-08-12T09:46:26Z</published>
	<updated>2009-08-12T09:46:26Z</updated>
	<author>
		<name>Theodorik OBroin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; Cheers for getting me to look at this again.
&lt;br&gt;&lt;br&gt;&amp;nbsp; I find the easiest way is to update the title - that way you don't have to
&lt;br&gt;do a CLS all the time.
&lt;br&gt;&lt;br&gt;&amp;nbsp; The reason for the two lines of ping -n, is that it's quicker for ping to
&lt;br&gt;do a double ping of a second each, versus a single ping of two seconds.
&lt;br&gt;&amp;nbsp; Try it out for yourself.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Let me know how you get on :o)
&lt;br&gt;&lt;br&gt;&amp;nbsp; Here's my version thus far:
&lt;br&gt;&lt;br&gt;:: begin spin.cmd
&lt;br&gt;@echo off
&lt;br&gt;setlocal
&lt;br&gt;&lt;br&gt;set COUNT=0
&lt;br&gt;set MAXCOUNT=10
&lt;br&gt;set SECONDS=1
&lt;br&gt;&lt;br&gt;:LOOP
&lt;br&gt;title &amp;quot;\&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;|&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;/&amp;quot;
&lt;br&gt;call :WAIT
&lt;br&gt;title &amp;quot;-&amp;quot;
&lt;br&gt;if /i &amp;quot;%COUNT%&amp;quot; equ &amp;quot;%MAXCOUNT%&amp;quot; goto :EXIT
&lt;br&gt;set /a count+=1
&lt;br&gt;echo %COUNT%
&lt;br&gt;goto :LOOP
&lt;br&gt;&lt;br&gt;:WAIT
&lt;br&gt;ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;ping -n %SECONDS% 127.0.0.1 &amp;gt; nul
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:EXIT
&lt;br&gt;title FIN!
&lt;br&gt;endlocal
&lt;br&gt;:: end spin.cmd
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/8/12 Aristos Vasiliou &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24940541&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a way to add some kind of progress indicator in a batch file?
&lt;br&gt;&amp;gt; Maybe stars, or something going like this \|/-\|/- You know something like a
&lt;br&gt;&amp;gt; spinning line.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It doesn't have to be exact, just something showing the user that things
&lt;br&gt;&amp;gt; are moving. I want to use this while installing programs using a batch file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [Non-text portions of this message have been removed]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24940541.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24938169</id>
	<title>progress bar</title>
	<published>2009-08-12T07:41:07Z</published>
	<updated>2009-08-12T07:41:07Z</updated>
	<author>
		<name>Aristos M. Vasiliou</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;Is there a way to add some kind of progress indicator in a batch file? Maybe stars, or something going like this \|/-\|/- You know something like a spinning line.
&lt;br&gt;&lt;br&gt;It doesn't have to be exact, just something showing the user that things are moving. I want to use this while installing programs using a batch file.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24938169.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24911485</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-10T21:24:19Z</published>
	<updated>2009-08-10T21:24:19Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">There are 2 ways to return from a call
&lt;br&gt;&lt;br&gt;1) &amp;nbsp;goto :EOF
&lt;br&gt;2) &amp;nbsp;exit /B X
&lt;br&gt;&lt;br&gt;In way 2, X is a number, and the errorlevel variable will be set to X.
&lt;br&gt;&lt;br&gt;Example
&lt;br&gt;&lt;br&gt;for %p in (one two three) do call :showParam
&lt;br&gt;&lt;br&gt;:ShowParam
&lt;br&gt;echo %1
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;oh ok Thanks...
&lt;br&gt;&lt;br&gt;Now
&lt;br&gt;&lt;br&gt;I have a bat script which conatins a for loop
&lt;br&gt;&lt;br&gt;for &amp;nbsp;******** do call :LABEL1
&lt;br&gt;&lt;br&gt;:LABEL1
&lt;br&gt;// here my code
&lt;br&gt;&lt;br&gt;:LABEL2
&lt;br&gt;//mycode
&lt;br&gt;goto :LABEL3
&lt;br&gt;&lt;br&gt;:LABEL3
&lt;br&gt;//bla bla
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;:LABEL4
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here After :LABEL3 completes it should go to for loop again for next iteration..
&lt;br&gt;That is I want to execute first three LABELS for each iteration of for loop.. after finished that LABEL4 should be executed..
&lt;br&gt;when one condition satisfies within for loop, then it should go to LABEL4 and execute from there..
&lt;br&gt;&lt;br&gt;Now In my code after :LABEL3 it is coming to LABEL4 .. I dont want that..
&lt;br&gt;ANd after :LABEL3 i cant put goto for loop because , In for loop i am accessing a file,, So it will start from the beginning..
&lt;br&gt;&lt;br&gt;What do I Do for this ??
&lt;br&gt;please reply..
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24911485.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24894273</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T21:41:20Z</published>
	<updated>2009-08-09T21:41:20Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">oh ok Thanks...
&lt;br&gt;&lt;br&gt;Now
&lt;br&gt;&lt;br&gt;I have a bat script which conatins a for loop
&lt;br&gt;&lt;br&gt;for &amp;nbsp;******** do call :LABEL1
&lt;br&gt;&lt;br&gt;:LABEL1
&lt;br&gt;// here my code
&lt;br&gt;&lt;br&gt;:LABEL2
&lt;br&gt;//mycode
&lt;br&gt;goto :LABEL3
&lt;br&gt;&lt;br&gt;:LABEL3
&lt;br&gt;//bla bla
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;:LABEL4
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here After :LABEL3 completes it should go to for loop again for next iteration..
&lt;br&gt;That is I want to execute first three LABELS for each iteration of for loop.. after finished that LABEL4 should be executed..
&lt;br&gt;when one condition satisfies within for loop, then it should go to LABEL4 and execute from there..
&lt;br&gt;&lt;br&gt;Now In my code after :LABEL3 it is coming to LABEL4 .. I dont want that..
&lt;br&gt;ANd after :LABEL3 i cant put goto for loop because , In for loop i am accessing a file,, So it will start from the beginning..
&lt;br&gt;&lt;br&gt;What do I Do for this ??
&lt;br&gt;please reply..
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24894273.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24894024</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T20:57:31Z</published>
	<updated>2009-08-09T20:57:31Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">You can assign the parameter to a temporary variable and use the variable:
&lt;br&gt;&lt;br&gt;:compile
&lt;br&gt;set HelpVar=%1
&lt;br&gt;if /I &amp;quot;%HelpVar:~0,5%&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;...etc...
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;ya it worked fine :)
&lt;br&gt;&amp;nbsp;But in my code o am gettring str as a pameter from other piece &amp;nbsp;of code..
&lt;br&gt;&lt;br&gt;Here is my snippet
&lt;br&gt;&lt;br&gt;:processEach
&lt;br&gt;for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%r in (&amp;quot;!revDepends!&amp;quot;) do (set revDepends=%%s&amp; call :compile %%r)
&lt;br&gt;if not &amp;quot;!revDepends!&amp;quot; == &amp;quot;%1&amp;quot; goto :processEach
&lt;br&gt;&lt;br&gt;:compile
&lt;br&gt;echo %1
&lt;br&gt;if /I &amp;quot;%(%1):~0,5%&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI 
&lt;br&gt;&lt;br&gt;How Do I put %1 (that conatns a single value , may be 'zero.core' ) in if condition...
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;I missed the closing quote:
&lt;br&gt;&lt;br&gt;%str:~0,5%
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;Hi I have tried this , But it didnt work
&lt;br&gt;I have tried simple example..
&lt;br&gt;&lt;br&gt;set str = zero.core
&lt;br&gt;&lt;br&gt;if /I &amp;quot;%str:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI
&lt;br&gt;&lt;br&gt;It didnt print anything..
&lt;br&gt;&lt;br&gt;What is the problem here ??
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;In your code to process each line you add the following (which will take the first five letters of the variable and compare to zero. (including period)). &amp;nbsp;As you can see, if the comparison matches it jumps over the processing and returns without doing anything.
&lt;br&gt;&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;if /I &amp;quot;%reversefoo:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;goto :EndProcessLine
&lt;br&gt;...
&lt;br&gt;do processing stuff here
&lt;br&gt;...
&lt;br&gt;:EndProcessLine
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;The last line (goto :EOF) is the return statement assuming you got to ProcessLine using &amp;quot;call :ProcessLine ....etc...&amp;quot;. &amp;nbsp; You can also return using &amp;quot;exit /B &amp;nbsp;X&amp;quot; &amp;nbsp;where X is a number. &amp;nbsp;If you use this approach, upon returning %errorlevel% will be set to X.
&lt;br&gt;&lt;br&gt;I hope this helps. &amp;nbsp;Check the website for Stepping Software. &amp;nbsp;You will find multiple interesting articles on interesting techniques to be applied in batch files. &amp;nbsp;Plus the best batch file debugger: Running Steps 1.1.
&lt;br&gt;&lt;br&gt;Good Luck.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24894024.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24890747</id>
	<title>help regarding goto LABEL</title>
	<published>2009-08-09T13:18:36Z</published>
	<updated>2009-08-10T03:01:51Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">Hello I have a bat script which conatins
&lt;br&gt;&lt;br&gt;a for loop
&lt;br&gt;&lt;br&gt;for &amp;nbsp;******** do call :LABEL1
&lt;br&gt;&lt;br&gt;:LABEL1
&lt;br&gt;//here my code
&lt;br&gt;&lt;br&gt;:LABEL2
&lt;br&gt;//mycode 
&lt;br&gt;goto :LABEL3
&lt;br&gt;&lt;br&gt;:LABEL3
&lt;br&gt;//bla bla
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;:LABEL4
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here After :LABEL3 completes it should go to for loop again for next iteration..
&lt;br&gt;Then when one condition satisfies , then it should go to LABEL4 and execute from there..
&lt;br&gt;&lt;br&gt;Now In my code after :LABEL3 it is coming to LABEL4 .. I dont want that..
&lt;br&gt;ANd after :LABEL3 i cant put goto for loop because , In for loop i am accessing a file,, So it will start from the beginning..
&lt;br&gt;&lt;br&gt;What do I Do for this ??
&lt;br&gt;please reply..</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/help-regarding-goto-LABEL-tp24890747p24890747.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24889788</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T11:27:12Z</published>
	<updated>2009-08-09T11:27:12Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">ya it worked fine :)
&lt;br&gt;&amp;nbsp;But in my code o am gettring str as a pameter from other piece &amp;nbsp;of code..
&lt;br&gt;&lt;br&gt;Here is my snippet
&lt;br&gt;&lt;br&gt;:processEach
&lt;br&gt;for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%r in (&amp;quot;!revDepends!&amp;quot;) do (set revDepends=%%s&amp; call :compile %%r)
&lt;br&gt;if not &amp;quot;!revDepends!&amp;quot; == &amp;quot;%1&amp;quot; goto :processEach
&lt;br&gt;&lt;br&gt;:compile
&lt;br&gt;echo %1
&lt;br&gt;if /I &amp;quot;%(%1):~0,5%&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI 
&lt;br&gt;&lt;br&gt;How Do I put %1 (that conatns a single value , may be 'zero.core' ) in if condition...
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;I missed the closing quote:
&lt;br&gt;&lt;br&gt;%str:~0,5%
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;Hi I have tried this , But it didnt work
&lt;br&gt;I have tried simple example..
&lt;br&gt;&lt;br&gt;set str = zero.core
&lt;br&gt;&lt;br&gt;if /I &amp;quot;%str:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI
&lt;br&gt;&lt;br&gt;It didnt print anything..
&lt;br&gt;&lt;br&gt;What is the problem here ??
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;In your code to process each line you add the following (which will take the first five letters of the variable and compare to zero. (including period)). &amp;nbsp;As you can see, if the comparison matches it jumps over the processing and returns without doing anything.
&lt;br&gt;&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;if /I &amp;quot;%reversefoo:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;goto :EndProcessLine
&lt;br&gt;...
&lt;br&gt;do processing stuff here
&lt;br&gt;...
&lt;br&gt;:EndProcessLine
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;The last line (goto :EOF) is the return statement assuming you got to ProcessLine using &amp;quot;call :ProcessLine ....etc...&amp;quot;. &amp;nbsp; You can also return using &amp;quot;exit /B &amp;nbsp;X&amp;quot; &amp;nbsp;where X is a number. &amp;nbsp;If you use this approach, upon returning %errorlevel% will be set to X.
&lt;br&gt;&lt;br&gt;I hope this helps. &amp;nbsp;Check the website for Stepping Software. &amp;nbsp;You will find multiple interesting articles on interesting techniques to be applied in batch files. &amp;nbsp;Plus the best batch file debugger: Running Steps 1.1.
&lt;br&gt;&lt;br&gt;Good Luck.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24889788.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24889682</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T11:11:46Z</published>
	<updated>2009-08-09T11:11:46Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">I missed the closing quote:
&lt;br&gt;&lt;br&gt;%str:~0,5%
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;Hi I have tried this , But it didnt work
&lt;br&gt;I have tried simple example..
&lt;br&gt;&lt;br&gt;set str = zero.core
&lt;br&gt;&lt;br&gt;if /I &amp;quot;%str:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI
&lt;br&gt;&lt;br&gt;It didnt print anything..
&lt;br&gt;&lt;br&gt;What is the problem here ??
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;In your code to process each line you add the following (which will take the first five letters of the variable and compare to zero. (including period)). &amp;nbsp;As you can see, if the comparison matches it jumps over the processing and returns without doing anything.
&lt;br&gt;&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;if /I &amp;quot;%reversefoo:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;goto :EndProcessLine
&lt;br&gt;...
&lt;br&gt;do processing stuff here
&lt;br&gt;...
&lt;br&gt;:EndProcessLine
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;The last line (goto :EOF) is the return statement assuming you got to ProcessLine using &amp;quot;call :ProcessLine ....etc...&amp;quot;. &amp;nbsp; You can also return using &amp;quot;exit /B &amp;nbsp;X&amp;quot; &amp;nbsp;where X is a number. &amp;nbsp;If you use this approach, upon returning %errorlevel% will be set to X.
&lt;br&gt;&lt;br&gt;I hope this helps. &amp;nbsp;Check the website for Stepping Software. &amp;nbsp;You will find multiple interesting articles on interesting techniques to be applied in batch files. &amp;nbsp;Plus the best batch file debugger: Running Steps 1.1.
&lt;br&gt;&lt;br&gt;Good Luck.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24889682.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24889104</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T10:08:27Z</published>
	<updated>2009-08-09T10:08:27Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">Hi I have tried this , But it didnt work
&lt;br&gt;I have tried simple example..
&lt;br&gt;&lt;br&gt;set str = zero.core
&lt;br&gt;&lt;br&gt;if /I &amp;quot;%str:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;echo HI
&lt;br&gt;&lt;br&gt;It didnt print anything..
&lt;br&gt;&lt;br&gt;What is the problem here ??
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;In your code to process each line you add the following (which will take the first five letters of the variable and compare to zero. (including period)). &amp;nbsp;As you can see, if the comparison matches it jumps over the processing and returns without doing anything.
&lt;br&gt;&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;if /I &amp;quot;%reversefoo:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;goto :EndProcessLine
&lt;br&gt;...
&lt;br&gt;do processing stuff here
&lt;br&gt;...
&lt;br&gt;:EndProcessLine
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;The last line (goto :EOF) is the return statement assuming you got to ProcessLine using &amp;quot;call :ProcessLine ....etc...&amp;quot;. &amp;nbsp; You can also return using &amp;quot;exit /B &amp;nbsp;X&amp;quot; &amp;nbsp;where X is a number. &amp;nbsp;If you use this approach, upon returning %errorlevel% will be set to X.
&lt;br&gt;&lt;br&gt;I hope this helps. &amp;nbsp;Check the website for Stepping Software. &amp;nbsp;You will find multiple interesting articles on interesting techniques to be applied in batch files. &amp;nbsp;Plus the best batch file debugger: Running Steps 1.1.
&lt;br&gt;&lt;br&gt;Good Luck.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24889104.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24888480</id>
	<title>Running Steps Debugger</title>
	<published>2009-08-09T08:59:42Z</published>
	<updated>2009-08-09T08:59:42Z</updated>
	<author>
		<name>foxidrive-7</name>
	</author>
	<content type="html">On Sun, 9 Aug 2009 08:14:26 -0700 (PDT), giskier
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24888480&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gonzaloi@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;The link is not malicious. &amp;nbsp;I am simply informing you of a great tool for
&lt;br&gt;&amp;gt;batch files in a forum for batch files. &amp;nbsp;If you don't want to click, just do
&lt;br&gt;&amp;gt;a search on &amp;quot;Running Steps Debugger&amp;quot;. &amp;nbsp;You will find the same information I
&lt;br&gt;&amp;gt;am giving you here.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;GISkier
&lt;br&gt;&lt;br&gt;How are these posts getting to batchworld? &amp;nbsp;Are you gating them yourself?
&lt;br&gt;Do you have permission from Yahoo or the moderator?
&lt;br&gt;&lt;br&gt;I would welcome such an arrangement where the original posts arrive here as
&lt;br&gt;well, but seeing *only* your followups and the text below made me very
&lt;br&gt;suspcious.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;Sent from the Batch World mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;This isn't Nabble.com and only your user name is on these posts...
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24888480.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24888023</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T08:14:17Z</published>
	<updated>2009-08-09T08:14:17Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">The link is not malicious. &amp;nbsp;I am simply informing you of a great tool for batch files in a forum for batch files. &amp;nbsp;If you don't want to click, just do a search on &amp;quot;Running Steps Debugger&amp;quot;. &amp;nbsp;You will find the same information I am giving you here.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Theodorik OBroin wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Cheers mate ;o)
&lt;br&gt;&lt;br&gt;2009/8/8 foxidrive &amp;lt;foxidrive@yahoo.com.au&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Be careful with the URLs below - I don't think nabble.com it affiliated
&lt;br&gt;&amp;gt; with batchworld at all. They could be links with malware exploits.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sat, 8 Aug 2009 08:34:56 -0700 (PDT), giskier
&lt;br&gt;&amp;gt; &amp;lt;gonzaloi@steppingsoftware.com &amp;lt;gonzaloi%40steppingsoftware.com&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;In order to better debug your batch code, I recommend using Running Steps.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;The batch debugger from Stepping Software (
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.steppingsoftware0.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.steppingsoftware0.com&lt;/a&gt;).
&lt;br&gt;&amp;gt; &amp;gt;It has a code analyzer which provides you with errors and warnings even
&lt;br&gt;&amp;gt; &amp;gt;before you start executing, plus you can step through your code, watch
&lt;br&gt;&amp;gt; &amp;gt;variables, etc.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Good Luck
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;GISkier
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;--
&lt;br&gt;&amp;gt; &amp;gt;View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;Sent from the Batch World mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24888023.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24887995</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T08:12:51Z</published>
	<updated>2009-08-09T08:12:51Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">In your code to process each line you add the following (which will take the first five letters of the variable and compare to zero. (including period)). &amp;nbsp;As you can see, if the comparison matches it jumps over the processing and returns without doing anything.
&lt;br&gt;&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;if /I &amp;quot;%reversefoo:~0,5&amp;quot; == &amp;quot;zero.&amp;quot; &amp;nbsp;goto :EndProcessLine
&lt;br&gt;...
&lt;br&gt;do processing stuff here
&lt;br&gt;...
&lt;br&gt;:EndProcessLine
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;&lt;br&gt;The last line (goto :EOF) is the return statement assuming you got to ProcessLine using &amp;quot;call :ProcessLine ....etc...&amp;quot;. &amp;nbsp; You can also return using &amp;quot;exit /B &amp;nbsp;X&amp;quot; &amp;nbsp;where X is a number. &amp;nbsp;If you use this approach, upon returning %errorlevel% will be set to X.
&lt;br&gt;&lt;br&gt;I hope this helps. &amp;nbsp;Check the website for Stepping Software. &amp;nbsp;You will find multiple interesting articles on interesting techniques to be applied in batch files. &amp;nbsp;Plus the best batch file debugger: Running Steps 1.1.
&lt;br&gt;&lt;br&gt;Good Luck.
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Raagu&quot;&gt;&lt;br&gt;Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;giskier wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24887995.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24885987</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-09T03:49:05Z</published>
	<updated>2009-08-09T03:49:05Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">Thanks giskier... Your code worked fine.. [:)]
&lt;br&gt;NOw I have one more thing to resolve.
&lt;br&gt;I have a string &amp;quot;reverseFoo&amp;quot; which contains list of values , all are comma separarted..
&lt;br&gt;I have to process each one of them..
&lt;br&gt;&lt;br&gt;I have to check each value .. If it starts with &amp;quot;zero.&amp;quot; then I should discard them , otherwise process them (simply echo them)..
&lt;br&gt;&lt;br&gt;How Do I put it in for loop ???
&lt;br&gt;&lt;br&gt;Please do reply 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;giskier&quot;&gt;&lt;br&gt;You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24885987.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24881898</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-08T13:28:53Z</published>
	<updated>2009-08-08T13:28:53Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">You can use a command in the form
&lt;br&gt;&lt;br&gt;for /f %p in (myfile.txt) do call :ProcessLine %p
&lt;br&gt;goto :EOF
&lt;br&gt;&lt;br&gt;:ProcessLine
&lt;br&gt;rem Add code here to reverse the line (which is %* since its used as parameter in the call), and do all the processing you need here.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;&lt;br&gt;PS. If you don't trust the llink I sent, which is not malicious, just do a web search for &amp;quot;Running Steps debugger&amp;quot; &amp;nbsp;and you will find this tool. &amp;nbsp;It will be very helpful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Raagu wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24881898.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24881737</id>
	<title>Re: Read File and Use in Batch</title>
	<published>2009-08-08T13:06:31Z</published>
	<updated>2009-08-08T13:06:31Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">use this
&lt;br&gt;&lt;br&gt;key=PO_NUMBER
&lt;br&gt;for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (C:\Edi\Prod\xlate\i\52122\userexit) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c:\edisendmail.exe -r ryan.johnson@email.com -s &amp;quot;PO %%b Received&amp;quot; -t &amp;quot;PO %%b Received&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&lt;br&gt;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Ryan Johnson-4 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I want to have a batch file open a file that I am passing to it as %1, read the data inside that file and use that later in the batch file.
&lt;br&gt;&lt;br&gt;At the command prompt I am typing this:
&lt;br&gt;&lt;br&gt;c:\&amp;gt;email_po.bat C:\Edi\Prod\xlate\i\52122\userexit
&lt;br&gt;&lt;br&gt;The userexit file only has this data in it:
&lt;br&gt;&lt;br&gt;PO_NUMBER=123456
&lt;br&gt;&lt;br&gt;I want to use the value of the PO_NUMBER in %2 in the batch file below:
&lt;br&gt;&lt;br&gt;c:\edisendmail.exe -r ryan.johnson@email.com -s &amp;quot;PO %2 Received&amp;quot; -t &amp;quot;PO %2 Received&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;So the subject of my email would read:
&lt;br&gt;&lt;br&gt;&amp;quot;PO 123456 Received&amp;quot;
&lt;br&gt;&lt;br&gt;How can I have the batch file get the valued after &amp;quot;PO_NUMBER=&amp;quot; so it can be used in my email string?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Ryan Johnson
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Read-File-and-Use-in-Batch-tp23673495p24881737.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24878046</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-08T11:44:30Z</published>
	<updated>2009-08-08T11:44:30Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">Hello Thanks for wonderful reply. It worked fine..
&lt;br&gt;But I have to execute this for loop multiple times and d number of times determined by number files in a text file..
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the my snippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f %%f in (myBuild\modules.txt) do (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set revDepends=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set commaAdder=
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (%%f\.zero\private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str=%%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !str!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;:reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!str!&amp;quot;) do (set revDepends=%%p!commaAdder!!revDepends!&amp;set str=%%q&amp;set commaAdder=,)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not &amp;quot;!str!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo !revDepends!	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I wrote like this....
&lt;br&gt;Here 'str' contains list of strings separated by comma after first inner for loop
&lt;br&gt;&lt;br&gt;myBuild/modules.properties contains two lines as below
&lt;br&gt;demo
&lt;br&gt;simple
&lt;br&gt;&lt;br&gt;I want to execute your for loop twice for these two lines..
&lt;br&gt;But In my code, the outer for loop executing only once..
&lt;br&gt;&lt;br&gt;can u tel what is happening.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24878046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24880338</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-08T10:27:12Z</published>
	<updated>2009-08-08T10:27:12Z</updated>
	<author>
		<name>Theodorik OBroin</name>
	</author>
	<content type="html">Cheers mate ;o)
&lt;br&gt;&lt;br&gt;2009/8/8 foxidrive &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24880338&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;foxidrive@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Be careful with the URLs below - I don't think nabble.com it affiliated
&lt;br&gt;&amp;gt; with batchworld at all. They could be links with malware exploits.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sat, 8 Aug 2009 08:34:56 -0700 (PDT), giskier
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24880338&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gonzaloi@...&lt;/a&gt; &amp;lt;gonzaloi%40steppingsoftware.com&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;In order to better debug your batch code, I recommend using Running Steps.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;The batch debugger from Stepping Software (
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.steppingsoftware0.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.steppingsoftware0.com&lt;/a&gt;).
&lt;br&gt;&amp;gt; &amp;gt;It has a code analyzer which provides you with errors and warnings even
&lt;br&gt;&amp;gt; &amp;gt;before you start executing, plus you can step through your code, watch
&lt;br&gt;&amp;gt; &amp;gt;variables, etc.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Good Luck
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;GISkier
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;--
&lt;br&gt;&amp;gt; &amp;gt;View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;Sent from the Batch World mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24880338.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24879377</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-08T08:51:11Z</published>
	<updated>2009-08-08T08:51:11Z</updated>
	<author>
		<name>foxidrive-7</name>
	</author>
	<content type="html">&lt;br&gt;Be careful with the URLs below - I don't think nabble.com it affiliated
&lt;br&gt;with batchworld at all. &amp;nbsp;They could be links with malware exploits.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sat, 8 Aug 2009 08:34:56 -0700 (PDT), giskier
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24879377&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gonzaloi@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;In order to better debug your batch code, I recommend using Running Steps. 
&lt;br&gt;&amp;gt;The batch debugger from Stepping Software (&lt;a href=&quot;http://www.steppingsoftware0.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.steppingsoftware0.com&lt;/a&gt;). 
&lt;br&gt;&amp;gt;It has a code analyzer which provides you with errors and warnings even
&lt;br&gt;&amp;gt;before you start executing, plus you can step through your code, watch
&lt;br&gt;&amp;gt;variables, etc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Good Luck
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;GISkier
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;-- 
&lt;br&gt;&amp;gt;View this message in context: &lt;a href=&quot;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p248779810.html&lt;/a&gt;&lt;br&gt;&amp;gt;Sent from the Batch World mailing list archive at Nabble.com.
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24879377.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24877981</id>
	<title>Re: process the list in reverse order in batch file</title>
	<published>2009-08-08T08:34:56Z</published>
	<updated>2009-08-08T08:34:56Z</updated>
	<author>
		<name>giskier</name>
	</author>
	<content type="html">You can always reverse the original string, and then process the reversed string front to back for what you need to accomplish. &amp;nbsp;Sample code which will reverse a comma separated string is:
&lt;br&gt;&lt;br&gt;setlocal ENABLEDELAYEDEXPANSION
&lt;br&gt;set foo=one,two,three,four
&lt;br&gt;set revFoo=
&lt;br&gt;set commaAdder=
&lt;br&gt;&lt;br&gt;:reverseLoop
&lt;br&gt;for /F &amp;quot;tokens=1,* delims=,&amp;quot; %%p in (&amp;quot;!foo!&amp;quot;) do (set revFoo=%%p!commaAdder!!revFoo!&amp;set foo=%%q&amp;set commaAdder=,)
&lt;br&gt;if not &amp;quot;!foo!&amp;quot; == &amp;quot;&amp;quot; goto :reverseLoop
&lt;br&gt;&lt;br&gt;echo foo is !foo!
&lt;br&gt;echo revFoo is !revFoo! &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;In order to better debug your batch code, I recommend using Running Steps. &amp;nbsp;The batch debugger from Stepping Software (&lt;a href=&quot;http://www.steppingsoftware.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.steppingsoftware.com&lt;/a&gt;). &amp;nbsp;It has a code analyzer which provides you with errors and warnings even before you start executing, plus you can step through your code, watch variables, etc.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;&lt;br&gt;GISkier
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24877981.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24846264</id>
	<title>process the list in reverse order in batch file</title>
	<published>2009-08-06T06:10:33Z</published>
	<updated>2009-08-06T06:10:33Z</updated>
	<author>
		<name>Raagu</name>
	</author>
	<content type="html">Hello I have a variable called &amp;quot;str&amp;quot; which contains list of values . All are comma separated . I need to process them in reverse order ..
&lt;br&gt;&lt;br&gt;How can I do it using for loop ???
&lt;br&gt;I have code nippet
&lt;br&gt;&lt;br&gt;key=dependencies
&lt;br&gt;for /f &amp;quot;tokens=1-2 delims==&amp;quot; %%a in (private\resolved.properties) do (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if %%a equ !key! (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set str = %%b
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // here str will conatain list of values all are comma separated . How do I &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;access those values in reverse order ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/process-the-list-in-reverse-order-in-batch-file-tp24846264p24846264.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24627013</id>
	<title>Re: delete file on particular date using a script</title>
	<published>2009-07-23T07:31:53Z</published>
	<updated>2009-07-23T07:31:53Z</updated>
	<author>
		<name>PatrickMc</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;mercykamal wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;&lt;i&gt;i want to delete a file on particular date please give me the code&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
If you mean delete files that were created/modified/accessed on a particular date/time, then following script will work.
&lt;br&gt;&lt;br&gt;&lt;br&gt;# script delete.txt
&lt;br&gt;# Get a list of files that were created on a particular date.
&lt;br&gt;var str list ; lf -rn &amp;quot;*&amp;quot; &amp;quot;some folder&amp;quot; ( ($fctime &amp;lt; &amp;quot;20090101130000&amp;quot;) AND ($fctime &amp;gt; &amp;quot;20090101120000&amp;quot;) &amp;gt; $list
&lt;br&gt;# Delete files one by one
&lt;br&gt;while ($list &amp;lt;&amp;gt; &amp;quot;&amp;quot;)
&lt;br&gt;do
&lt;br&gt;&amp;nbsp; &amp;nbsp; var str file ; lex &amp;quot;1&amp;quot; $list &amp;gt; $file
&lt;br&gt;&amp;nbsp; &amp;nbsp; system delete (&amp;quot;\&amp;quot;&amp;quot;+$file+&amp;quot;\&amp;quot;&amp;quot;)
&lt;br&gt;done
&lt;br&gt;&lt;br&gt;&lt;br&gt;Script is in biterscripting ( &lt;a href=&quot;http://www.biterscripting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.biterscripting.com&lt;/a&gt;&amp;nbsp;) . The above script will delete files created between Jan 1, 2009 12:00 noon, and 1:00 pm. Use $fmtime for modification time, and $fatime for access time.
&lt;br&gt;&lt;br&gt;Patrick
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/delete-file-on-particular-date-tp22057247p24627013.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24618222</id>
	<title>Re: Walking a directory</title>
	<published>2009-07-22T19:14:03Z</published>
	<updated>2009-07-22T19:14:03Z</updated>
	<author>
		<name>comrau</name>
	</author>
	<content type="html">&lt;br&gt;Thank you, this is good news for other visitors
&lt;br&gt;&lt;br&gt;&lt;br&gt;[url=&lt;a href=&quot;http://simulationpretpersonnel.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://simulationpretpersonnel.com&lt;/a&gt;][color=#FFFFFF][u]pret personnel enligne[/u][/color][/url][color=#FFFFFF] - Pret personnel en ligne et de [/color]</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Walking-a-directory-tp17764286p24618222.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24450228</id>
	<title>RE: Cannot delete empty folder for some reason</title>
	<published>2009-07-12T09:41:34Z</published>
	<updated>2009-07-12T09:41:34Z</updated>
	<author>
		<name>Aristos M. Vasiliou</name>
	</author>
	<content type="html">As always, you're the best Mic :)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;________________________________
&lt;br&gt;&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24450228&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt; on behalf of foxidrive
&lt;br&gt;Sent: Sun 7/12/2009 6:23 PM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24450228&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;batchworld@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [BATCH WORLD] Cannot delete empty folder for some reason
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sun, 12 Jul 2009 12:17:29 +0300, &amp;quot;Aristos Vasiliou&amp;quot;
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24450228&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt; &amp;lt;mailto:aristos%40aristos.net&amp;gt; &amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I am using this batch file to create another batch file in %tmp% which will delete &amp;quot;C:\webserver&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO.@ECHO off
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO RD /S /Q &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO ECHO Easy Web Server was successfully removed from your computer
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO PAUSE
&lt;br&gt;&amp;gt;cd /d &amp;quot;%TMP%&amp;quot;
&lt;br&gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;My problem is that the batch file created in %tmp% cannot delete &amp;quot;C:\webserver&amp;quot; and the error message is &amp;quot;The process cannot access the file because it is being used by another process.&amp;quot; Which is weird because C:\webserver is just an empty folder.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;So I downloaded Process Monitor to see which process is keeping C:\webserver in use and found that no process is keeping that folder in use.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do you see anything in that batch file that could be causing this problem?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Thanks
&lt;/div&gt;&lt;br&gt;%temp% is normally the place rather than %tmp% 
&lt;br&gt;&lt;br&gt;There may be a permissions issue because it is in the root of C: but try
&lt;br&gt;this batch file to see if it works on your PC. It works here in XP.
&lt;br&gt;&lt;br&gt;@echo off
&lt;br&gt;md &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;cd /d &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;dir
&lt;br&gt;set file=&amp;quot;%TEMP%.\Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;gt; %file% ECHO.@ECHO off
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO RD /S /Q &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO ECHO Easy Web Server was successfully removed from your computer
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO PAUSE
&lt;br&gt;cd /d &amp;quot;%TEMP%&amp;quot;
&lt;br&gt;dir &amp;quot;Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;quot;Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24450228.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24449597</id>
	<title>Re: Cannot delete empty folder for some reason</title>
	<published>2009-07-12T08:23:50Z</published>
	<updated>2009-07-12T08:23:50Z</updated>
	<author>
		<name>foxidrive-7</name>
	</author>
	<content type="html">On Sun, 12 Jul 2009 12:17:29 +0300, &amp;quot;Aristos Vasiliou&amp;quot;
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24449597&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aristos@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I am using this batch file to create another batch file in %tmp% which will delete &amp;quot;C:\webserver&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO.@ECHO off
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO RD /S /Q &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO ECHO Easy Web Server was successfully removed from your computer
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO PAUSE
&lt;br&gt;&amp;gt;cd /d &amp;quot;%TMP%&amp;quot;
&lt;br&gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;My problem is that the batch file created in %tmp% cannot delete &amp;quot;C:\webserver&amp;quot; and the error message is &amp;quot;The process cannot access the file because it is being used by another process.&amp;quot; Which is weird because C:\webserver is just an empty folder.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;So I downloaded Process Monitor to see which process is keeping C:\webserver in use and found that no process is keeping that folder in use.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do you see anything in that batch file that could be causing this problem?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Thanks
&lt;/div&gt;&lt;br&gt;&lt;br&gt;%temp% is normally the place rather than %tmp% 
&lt;br&gt;&lt;br&gt;There may be a permissions issue because it is in the root of C: but try
&lt;br&gt;this batch file to see if it works on your PC. &amp;nbsp;It works here in XP.
&lt;br&gt;&lt;br&gt;&lt;br&gt;@echo off
&lt;br&gt;md &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;cd /d &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;dir
&lt;br&gt;set file=&amp;quot;%TEMP%.\Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; %file% ECHO.@ECHO off
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO RD /S /Q &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO ECHO Easy Web Server was successfully removed from your computer
&lt;br&gt;&amp;gt;&amp;gt; %file% ECHO PAUSE
&lt;br&gt;cd /d &amp;quot;%TEMP%&amp;quot;
&lt;br&gt;dir &amp;quot;Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&amp;quot;Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24449597.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24447033</id>
	<title>Cannot delete empty folder for some reason</title>
	<published>2009-07-12T02:17:29Z</published>
	<updated>2009-07-12T02:17:29Z</updated>
	<author>
		<name>Aristos M. Vasiliou</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I am using this batch file to create another batch file in %tmp% which will delete &amp;quot;C:\webserver&amp;quot;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO.@ECHO off
&lt;br&gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO RD /S /Q &amp;quot;%HOMEDRIVE%\webserver&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO ECHO Easy Web Server was successfully removed from your computer
&lt;br&gt;&amp;gt;&amp;gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot; ECHO PAUSE
&lt;br&gt;cd /d &amp;quot;%TMP%&amp;quot;
&lt;br&gt;&amp;quot;%TMP%.\Uninstall_EasyWebServer.cmd&amp;quot;
&lt;br&gt;&lt;br&gt;My problem is that the batch file created in %tmp% cannot delete &amp;quot;C:\webserver&amp;quot; and the error message is &amp;quot;The process cannot access the file because it is being used by another process.&amp;quot; Which is weird because C:\webserver is just an empty folder.
&lt;br&gt;&lt;br&gt;So I downloaded Process Monitor to see which process is keeping C:\webserver in use and found that no process is keeping that folder in use.
&lt;br&gt;&lt;br&gt;Do you see anything in that batch file that could be causing this problem?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[Non-text portions of this message have been removed]
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/If-then-Question-tp24358765p24447033.html" />
</entry>

</feed>
