Metalworking (rec.crafts.metalworking) Discuss various aspects of working with metal, such as machining, welding, metal joining, screwing, casting, hardening/tempering, blacksmithing/forging, spinning and hammer work, sheet metal work.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,286
Default batch or command file help

I need to search my whole computer in all folders for these files and delete
them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?

contents of camclean.bat
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS


  #2   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6
Default batch or command file help

You would be better off in the long run, if you installed cygwin and
used bash for scripting.

i

On 2008-09-04, Karl Townsend wrote:
I need to search my whole computer in all folders for these files and delete
them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?

contents of camclean.bat
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS



--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/
  #3   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 561
Default batch or command file help

On Sep 4, 8:03 am, "Karl Townsend"
wrote:
I need to search my whole computer in all folders for these files and delete
them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?

contents of camclean.bat
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS



I'm not sure how to prompt for an input, but you can pass a parameter
when calling up the .bat file.

http://windowsitpro.com/article/arti...atch-file.html

example: C:del_crap.bat C

Dave
  #4   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,417
Default batch or command file help

On Thu, 4 Sep 2008 07:03:42 -0500, "Karl Townsend"
wrote:

I need to search my whole computer in all folders for these files and delete
them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?


If this is just a one time thing why not use Windows File
Manager/Find function ("Window Key+f")? It can find stuff
using wild cards. Maybe try something like "dmc*" and see
what all comes up with. Then try "glwdm*". Hold down your
control key and click on each file found to highlight. Then
hold shift down while tapping the delete key if you really
want them gone and not just in the recycle bin.

--
Leon Fisk
Grand Rapids MI/Zone 5b
Remove no.spam for email
  #5   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,286
Default batch or command file help

If this is just a one time thing why not use Windows File
Manager/Find function ("Window Key+f")? It can find stuff
using wild cards. Maybe try something like "dmc*" and see
what all comes up with. Then try "glwdm*". Hold down your
control key and click on each file found to highlight. Then
hold shift down while tapping the delete key if you really
want them gone and not just in the recycle bin.


No, I end up doing this at least twice a year. AND, everybody that owns
Camsoft ends up doing it, at least occasionally. I want to offer a script to
the Camsoft newsgroup. Iggy's suggestion is a second choice because you'd
have to download and install software just to run the batch file.

karl




  #6   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 12,924
Default batch or command file help


Karl Townsend wrote:

If this is just a one time thing why not use Windows File
Manager/Find function ("Window Key+f")? It can find stuff
using wild cards. Maybe try something like "dmc*" and see
what all comes up with. Then try "glwdm*". Hold down your
control key and click on each file found to highlight. Then
hold shift down while tapping the delete key if you really
want them gone and not just in the recycle bin.


No, I end up doing this at least twice a year. AND, everybody that owns
Camsoft ends up doing it, at least occasionally. I want to offer a script to
the Camsoft newsgroup. Iggy's suggestion is a second choice because you'd
have to download and install software just to run the batch file.



Do they always end up in the same directories? If so, 'Brute Force
Uninstaller' lets you write a script to do the job.

http://www.merijn.org/programs.php#bfu


--
http://improve-usenet.org/index.html

aioe.org, Goggle Groups, and Web TV users must request to be white
listed, or I will not see your messages.

If you have broadband, your ISP may have a NNTP news server included in
your account: http://www.usenettools.net/ISP.htm


There are two kinds of people on this earth:
The crazy, and the insane.
The first sign of insanity is denying that you're crazy.
  #7   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 4,562
Default batch or command file help

"Karl Townsend" wrote:

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?


Change dos prompt to drive you want to clean.

Execute command using full pathing. Drive:\directory\filename.bat

Basic dos.

Wes


--
"Additionally as a security officer, I carry a gun to protect
government officials but my life isn't worth protecting at home
in their eyes." Dick Anthony Heller
  #8   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 4,562
Default batch or command file help

"Karl Townsend" wrote:

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?



Don't want to wait until my post shows up. If these are unique file names, make a script
that cycles though drives c-z. Deleting stuff on drives that don't exist will not cause
you problem.

C:
Call your delete script
D:
Call your delete script
..
..
..

I might be wrong, iirc, call causes a basically subroutine jump.
If Command Extensions are enabled CALL changes as follows:

CALL command now accepts labels as the target of the CALL. The syntax
is:

CALL :label arguments

A new batch file context is created with the specified arguments and
control is passed to the statement after the label specified. You must
"exit" twice by reaching the end of the batch script file twice. The
first time you read the end, control will return to just after the CALL
statement. The second time will exit the batch script. Type GOTO /?
for a description of the GOTO :EOF extension that will allow you to
"return" from a batch script.

I'm rusty so you may need to do a bit more research.

Nighty night,

Wes
--
"Additionally as a security officer, I carry a gun to protect
government officials but my life isn't worth protecting at home
in their eyes." Dick Anthony Heller
  #9   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 64
Default batch or command file help


"Karl Townsend" wrote in message
...
I need to search my whole computer in all folders for these files and
delete them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?

contents of camclean.bat
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS


del /s dmc*.*
del /s glwdm*.*


  #10   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,286
Default batch or command file help

....
del /s dmc*.*
del /s glwdm*.*


This takes the baby (files you need) out with the bath water. Looks like
there's not a better way than to search with the above criteria and then
select files to delete.

Karl




  #11   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,417
Default batch or command file help

On Fri, 5 Sep 2008 07:30:29 -0500, "Karl Townsend"
wrote:

...
del /s dmc*.*
del /s glwdm*.*


This takes the baby (files you need) out with the bath water. Looks like
there's not a better way than to search with the above criteria and then
select files to delete.

Karl


Karl,

I'll have to take a look at my old references. It has been
too long since I last made a slightly complicated bat/cmd
file. My old 386 machine has the more tricky examples on it.
I'll get back to you on it if someone here doesn't come up
with a good solution first

It keeps my brain going messing around with stuff like this.

--
Leon Fisk
Grand Rapids MI/Zone 5b
Remove no.spam for email
  #12   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,417
Default batch or command file help

On Thu, 4 Sep 2008 07:03:42 -0500, "Karl Townsend"
wrote:

I need to search my whole computer in all folders for these files and delete
them. I'm trying to make a command file to automate the process. The
commands below will do one drive.

I'd like to improve this batch file by prompting for which drive to clean.
Any suggestions?


If camclean.bat is in your path you can do something like
this:

%1:
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS
pause
exit

Then start the command with something like "camclean g".
This would switch to drive D:, go to the root directory and
then run your list of commands, pause to see what happened
and then close the prompt window hitting any key. Remove the
"exit" if you want the window to stay open for more use.

If you forget to feed it a drive letter it will just do the
current drive where the batch file is located.

I've got some other ideas, but I haven't tested them yet.
The problem with batch files is getting user input into
them. Locating the old Choice.exe and using it can work with
multiple choice questions, otherwise it gets messy.

--
Leon Fisk
Grand Rapids MI/Zone 5b
Remove no.spam for email
  #13   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 4,562
Default batch or command file help

"Tom Gardner" wrote:

del /s dmc*.*



On my computer that would kill Delorme Topo 2.0, Autocad, Street Atlas USA 2006, some
windows system stuff, and some cygwin stuff.

Wes
  #14   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,417
Default batch or command file help

Here is one solution I came up with, but you will need to
get a copy of Choice.exe and put it in your path somewhere
(you might already have a copy). This program used to come
with older versions of DOS, only comes with the Resource
kits now. You can get several versions in a bundle he

http://my.vector.co.jp/servlet/Syste...dkclonesup.zip

Change your batch file to the following text in between the
equal signs:

===
@ECHO OFF
choice /Ccdefgh0 Choose drive letter to clean or 0 to abort
IF ERRORLEVEL 1 SET ERRORLEV=c
IF ERRORLEVEL 2 SET ERRORLEV=d
IF ERRORLEVEL 3 SET ERRORLEV=e
IF ERRORLEVEL 4 SET ERRORLEV=f
IF ERRORLEVEL 5 SET ERRORLEV=g
IF ERRORLEVEL 6 SET ERRORLEV=h
IF ERRORLEVEL 7 GOTO END

%ERRORLEV%:
cd\
del /s DMC32.DLL
del /s DMCBUS32.DLL
del /s DMCGC32.DLL
del /s DMCNET.EXE
del /s DMCNET.TLB
del /s DMCPAR32.DLL
del /s DMCREG.OCA
del /s DMCREG.OCX
del /s DMCSER32.DLL
del /s DMCSHELL.OCX
del /s GLWDMISA.INF
del /s GLWDMISA.SYS
del /s GLWDMPCI.INF
del /s GLWDMPCI.SYS
pause

:END
exit
===

You could edit/add a couple more drive letters if you wish.
I think the code is pretty self explanatory. You can get a
list of parameters for Choice by entering "Choice /?" at a
command prompt. It is a really simple little program.

See if that does what you want.

--
Leon Fisk
Grand Rapids MI/Zone 5b
Remove no.spam for email
  #15   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,286
Default batch or command file help


"Leon Fisk" wrote in message
...
Here is one solution I came up with, but you will need to
get a copy of Choice.exe and put it in your path somewhere


THANKS for your help.

Karl




  #16   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 916
Default batch or command file help

A bit late here, but if you can locate a copy, 'DOS Batch
File Power' with the Jamsa Batch Utilities disks by Kris
Jamsa is sort of a bible of batch file programming. I've not
really used it myself, but gave a copy to my brother who is
something of a guru. He was actually impressed with it and
used a number of techniques.

Don't know if it covers exactly what you want to do, but
it's worth hunting down for anyone still playing with .bat
files.

Jon
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Measuring out an epoxy batch into housings.... Den[_2_] Metalworking 10 February 24th 08 02:07 PM
Insinkerator 17-55 Batch Garbage Disposal Switch Failure frank1492 Home Repair 3 December 16th 06 12:49 AM
Insinkerator 17-55 Batch Garbage Disposal Switch Failure frank1492 Home Repair 0 December 13th 06 12:01 AM
WAY OT batch file command Karl Townsend Metalworking 8 September 4th 05 07:10 PM


All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"