View Single Post
# 1 07-11-2003 , 02:10 AM
Darkware's Avatar
Subscriber
Join Date: Oct 2002
Location: USA
Posts: 1,172

help with batch files. (.bat)

I'm trying to learn how to make batch files on my own so I can easily do certain things on my computer like erase my temporary internet files with a single click of the mouse, but am running into trouble.

First of all, for those of you who don't know the first thing about batch files:
-you save them as .bat An example is filenumberone.bat
-They have about 8 basic commands that are fairly easy to learn.
-by executing a batch file, you can do several things at once.

Now, right now, I'm just in the testing phase, so I created a directory.

C:\Documents and Settings\Administrator\Desktop\Master\TESTMAIN\TES TSUB

The command I'm using in the batch file (erase.bat) is

del C:\Docume~1\Admini~1\Desktop\Master\TESTMAIN\TESTS UB

The reason I changed the first two directories with a ~1 at the end is because batch files are run through DOS. DOS does not like file names with more than 8 characters. It automatically recognizes the files in their abreviated form.

Now, this works, but it only deletes files IN the directory. What I'm wanting to know is if there is a way to delete the actual FOLDERS - not just the files inside the folders.

Any ideas?


www.Darkware3D.com