Batch file developement

  • Thread starter Thread starter Ben Wallace
  • Start date Start date
B

Ben Wallace

Not sure if this is the best group to ask this question....but I'm trying to
run a batch file that would delete files from a given directory, but I'm not
having any success. Here is the text in the file
------------------------
@ECHO OFF
deltree C:\ABM\bin\*.* /y


CLS
EXIT
 
Same answer as in microsoft.public.windowsxp.security_admin

deltree is not available with Windows XP.

The rmdir /s command deletes directories containing files and
subdirectories. For more information about the rmdir command, see Rmdir.

Rmdir (rd)
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_rmdir.mspx

New ways to do familiar tasks

Start | Run | Copy and paste the following line:

%windir%\hh.exe ms-its:C:\WINDOWS\Help\ntcmds.chm::/dos_diffs.htm

Click OK.

Scroll down to Unavailable MS-DOS Commands

Or...

New ways to do familiar tasks
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/dos_diffs.mspx

-----

Command-line reference
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx

Or >>

Command-line reference

Start | Run | Copy and paste the following line:

hh ntcmds.chm

Click OK.
-----

Command-line reference A-Z
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx

Or >>

Command-line reference A-Z

Start | Run | Copy and paste the following line:

%windir%\hh.exe ms-its:c:\Windows\Help\ntcmds.chm::/ntcmds.htm

Click OK.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Ben Wallace said:
Not sure if this is the best group to ask this question....but I'm
trying to run a batch file that would delete files from a given
directory, but I'm not having any success. Here is the text in the
file ------------------------
@ECHO OFF
deltree C:\ABM\bin\*.* /y


CLS
EXIT
------------------------

I'm using windows XP Pro.

Thanks.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Hi, Ben.

The Deltree command does not exist in the WinXP version of the MS-DOS
emulator. Why not use the Remove Directory (rd or rmdir) command instead.
As usual in the "DOS" window, type the command followed by /? to see a
mini-Help file showing all the switches and parameters available with that
command: rd /?

The rd command has only two switches: /s to include all subdirectories, and
/q to go ahead without asking for confirmation.

So, just change:
deltree C:\ABM\bin\*.* /y

to:
rd C:\ABM\bin\*.* /s /q

Let us know how this works out for you.

RC
 
Stan said:
Please do not post the same question to multiple newsgroups as
separate articles. This just wastes everyone's time.

"What is the accepted way to share a message across multiple
newsgroups?" http://smjg.port5.com/faqs/usenet/xpost.html
Hi

Your link give me "ERROR 404 PAGE NOT FOUND"

A couple of other links about this issue:

Multiposting vs Crossposting
http://www.blakjak.demon.co.uk/mul_crss.htm

and

Please don't multi-post.
http://www.aspfaq.com/etiquette.asp?id=5003
 
Stan said:
in microsoft.public.windowsxp.general:



Try again -- I just now clicked on it and the pge pops right up.

Yepp, now it is working again...
 
Back
Top