?
Solved

unix to dos script conversion

Posted on 2004-03-31
5
Medium Priority
?
649 Views
Last Modified: 2013-12-26
Hi guys,

What would be the equivalent of this unix command from a ksh script in a cmd script in DOS shell?

find . -type d -name blahblah -exec rm {} \;

Thanks!
0
Comment
Question by:vrungel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Accepted Solution

by:
Alf666 earned 750 total points
ID: 10727287
Hemm.... Install Cygwin (all these tools under Win32). Much more powerfull than the DOS sh*t.

www.cygwin.com

You'll get a shell (bash, ksh, whatever, you name it), find if you want, the binutils ...etc.

Just for your information, Your find command is not optimal. It executes rm once per file found. You'd rather use the following :

find . -type d -name blahblah | xargs rm

xargs executes the fewest possible time the command you give as argument. It's only limit is the arguments stack size.
0
 
LVL 24

Expert Comment

by:fridom
ID: 10732227
That's one good tip. The other is using a scripting language. But the script is broken, so it does not matter ;-)

Regards
Friedrich
0
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 10734584
vrungel:
Try VBScript script , check FileSystemObject
0
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 10734615
0
 

Author Comment

by:vrungel
ID: 10738491
Thanks everyone, but I really needed to do it in DOS shell so the solution was

dir /s/b/ad blahblah > tempfile.txt
for /f  %f in (tempfile.txt) do del /s/f/q %f
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question