Delete with .bat file.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need some help with creating a .bat file to remove multiple folders and
files on the PCs in my network, but I haven't been able to find any guides
for this. So can someone show me how to create one?
 
Watki said:
I need some help with creating a .bat file to remove multiple
folders and files on the PCs in my network, but I haven't been able
to find any guides for this. So can someone show me how to create
one?

"Find" implies you have searched. Perhaps if you told us how you searched -
we can show you tricks to improve that ability so that you might find the
answer yourself in the future.

As for a guide on deleting files in a batch script..

START --> RUN

CMD

OK.

Type in:

del /?
<enter>

or you can type:

erase /?
<enter>

(Note that <enter> is pressing the ENTER key on the keyboard.)

also another command that may be useful to you:

rmdir /?
<enter>

Those command should be what you need (del/erase being the same command
really) to delete any files and folders you may want to from inside a batch
script. You could use "environment variables" to specify things like:

%SystemDrive% (The drive letter for your system drive - like C:)
%SystemRoot% (The root directory of your Windows install - like C:\Windows)
%USERPROFILE% (The directory of the current users profile - like
C:\Documents and Settings\Current User)

Etc... Use the SET command from the command prompt to get a list of normal
variables.

You might want to google for:
"create batch script to delete files and folders"
 
Watki said:
I need some help with creating a .bat file to remove multiple folders and
files on the PCs in my network, but I haven't been able to find any guides
for this. So can someone show me how to create one?

You might want to rethink the wisdom of using BAT files to delete stuff. Can
you spell C:\*.* boys and girls?

Patrick
 
Yes but they are handy. I use one to delete a pain in the ass file created
by my scanner driver. Its a debug file thats created and updated every
second and a few bytes are added to it every second. I created a small one
line bat file to delete it and run it as a scheduled task.

Glen P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top