Solved

unix to dos script conversion

Posted on 2004-03-31
5
643 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
5 Comments
 
LVL 9

Accepted Solution

by:
Alf666 earned 250 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for a specific application/software 2 109
Hibernate methods 2 71
has22 challenge 11 94
fizzArray  challenge 1 83
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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