LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > sumeet inani
User Name
Password

Notices


Rate this Entry

for loop in dos batch file

Posted 09-14-2011 at 11:25 PM by sumeet inani

Hi
i wanted to write a batch file that hides windows of particular application
It worked if I type line by line at command prompt
Code:
c:\>cmdow | find /i "gvim" | find /i "vis" | cut -f 1 -d " " > handle.txt
c:\>for /f %k in (handle.txt) do cmdow %k /hid
If you want a batch file to do that then
Code:
KEEP IN MIND
write %%k instead of %k
Later I came across http://www.jamesewelch.com/2008/05/0...through-files/

cmdow (http://www.commandline.co.uk/cmdow/)
cut (http://unxutils.sourceforge.net/)
Posted in Uncategorized
Views 1060 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration