?
Solved

unix to dos script conversion

Posted on 2004-03-31
5
Medium Priority
?
650 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 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