challenge: batch file programming

I need a batch file program that will allow me (under windows 2000) to do something like deltree c:/long file name/long file name/directory with wildcards and long file name but, under windows 2000 deltree doesnt work, it has been replaced by...




Topic Options
#112584 - 10/13/02 04:51 AM challenge: batch file programming
evilhomer Offline
enthusiast

Registered: 04/26/02
Posts: 13
I need a batch file program that will allow me (under windows 2000) to do something like

deltree c:/long file name/long file name/directory with wildcards and long file name

but, under windows 2000 deltree doesnt work, it has been replaced by rm which i beleive does not support wild cards. is there any way to be able to delete directories that have long file names using wild cards in a batch file??

Top
Advertisement
#112587 - 10/13/02 05:04 AM Re: challenge: batch file programming
adamvjackson Offline
Pooh-Bah

Registered: 08/26/02
Posts: 2174
Loc: Asheville, NC
C:\>del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

C:\>

Top
#161703 - 04/27/05 10:17 AM Re: challenge: batch file programming
Exxccessive Offline
journeyman

Registered: 04/26/05
Posts: 50
@echo off
IF "%1"=="/Y" GOTO NO_ASK
IF "%1"=="/y" GOTO NO_ASK
RMDIR /S %1
GOTO END
:NO_ASK
RMDIR /S/Q %2
:END

Fire up the mighty notepad
save it as Deltree.bat

thats the deltree emulator

use it as you would use deltree








Top
#161712 - 04/27/05 04:11 PM Re: challenge: batch file programming
theefool Offline
enthusiast

Registered: 03/28/03
Posts: 352
Why create a batch file for deltree when you can just download it?

http://home.kooee.com.au/kingull/deltree/DELTREE.zip

also rmdir and rd are the same thing.

Top
#161717 - 04/27/05 05:00 PM Re: challenge: batch file programming
Exxccessive Offline
journeyman

Registered: 04/26/05
Posts: 50
Originally posted by theefool:
Quote:
Why create a batch file for deltree when you can just download it?

http://home.kooee.com.au/kingull/deltree/DELTREE.zip

also rmdir and rd are the same thing.



LOLS!!!! that's good...... why not download it.....


What's wrong with Resource"fullness" and "create"tivity?


i think you're missing the cue, my friend....

It's better to know how to make things happen, than to ask how things happen..

thanks for the deltree link anyway.

cheers..

Top
#161721 - 04/27/05 05:19 PM Re: challenge: batch file programming
theefool Offline
enthusiast

Registered: 03/28/03
Posts: 352
No problem. A few years ago I and my friend made scripts for work. He'd write them in perl and I'd do dos batch files. Both the scripts did the same, we just tried to see who can make a better version. In the end, we just did it to challenge ourselves. Lotsa fun. Especially when it comes to sorting within a script.

Top


Forums
Windows Support Forums
Everything New Technology
Legacy OS
Hardware
Software
Games
Networking
Customization & Tweaking
Security

Linux Support Forums
Everything Linux
Linux Hardware
Linux Software
Linux Games
Linux Networking
Linux Customization & Tweaking
Linux Security

Apple Support Forums
Everything Apple
Recent Topics
Ninja coming to Conquer Online
by Meditator
2 seconds ago
StarCraft new patch problem.
by Roland Bawd
11/30/08 08:02 AM
One of the USB devices attached to this computer h
by draa
11/28/08 02:13 AM
Lan won't work -- Windows Vista Premium
by DanielS
11/27/08 11:14 PM
Please Help!
by ashwee
11/27/08 02:17 AM
Who's Online
1 Registered (Meditator), 169 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
89474 Members
24 Forums
43069 Topics
172854 Posts

Max Online: 1079 @ 03/12/08 01:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22