Jump to content

Batch Files?


mstester

Recommended Posts


@the_doc735

You should read on this site:

http://www.robvanderwoude.com/

particularly these:

http://www.robvanderwoude.com/local.html

http://www.robvanderwoude.com/ntset.html

Briefly, Enabling Command Extensions modifies the way some commands are carried out and allows for particular syntaxes.

To make sure that Command Extensions are enabled, you should begin a .cmd file with (after @Echo OFF):

SETLOCAL ENABLEEXTENSIONS

jaclaz

P.S.:

A chef may use a frying pan, but what is it?

A shallow, long-handled, circular metal container, usually 8, 10 and 12 inches in diameter; used for frying food. Also called skillet; also called regionally fry pan, spider.

Hope you understand me better now?

We technicians have the habit of referring to those, respectively, as SMALL, MEDIUM and LARGE pan, or as #1,#2 and #3 skillet. B)

Using the correct words helps! :whistle:

Edited by jaclaz
Link to comment
Share on other sites

The simplest answer to the original question is, Stop using Del.

Way back in DOS 5 or 6, MS came out with a much more powerful command, "Deltree.exe".

It's what they called an 'External' command. Meaning it's not a part of the command interpreter.

It will run on virtually any PC running an MS OS.

Again, MS in their infinite wisdom, removed this command from Windows XP.

But, you can get it off of any PC running 98, 98/SE or ME.

Or from Here.

Just put it in your 'C:\windows\system32' folder.

I have not used the old "Del" command for many years. Deltree is much more powerful and versatile.

I use it in my own "XPCleanup.bat" file to keep my hard drive clean.

Here's an example of how it can be used:

Rem: The Deltree.exe command must be in your C:\windows\system32

Rem: folder before this program will run.

Rem: This command can be found in any system running Windows 98 or ME. I've also

Rem: placed this program on my webpage for easy access.

Rem: The /y after deltree tells deltree to execute the command without stopping to ask if it's OK.

Rem: The lines that do not adhear to the DOS 8+3 filename structure must be in quotes.

cls

deltree /y C:\temp\*.*

deltree /y %systemroot%\temp\*.*

deltree /y "%systemroot%\system32\config\systemprofile\cookies\*.*"

deltree /y "%systemroot%\SYSTEM32\config\systemprofile\Local Settings\History\History.IE5\*.*"

deltree /y "%systemroot%\SYSTEM32\config\systemprofile\Local Settings\Temporary Internet Files\*.*"

deltree /y "%systemroot%\SYSTEM32\config\systemprofile\Local Settings\Temp\*.*"

deltree /y "C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\*.*"

deltree /y "C:\Documents and Settings\Default User\Local Settings\History\History.IE5\*.*"

deltree /y "C:\Documents and Settings\Default User\Local Settings\Temp\*.*"

Get Deltree.exe, use it and you'll love it.

Y'all have a great day now, Y'hear?

Andromeda43 B)

Link to comment
Share on other sites

VBS script to delete a folder and everything in it.

1:\ Gets the Path From This Loc = Fso.GetParentFolderName(WScript.ScriptFullName)

This provides the path to where the script is ran from.

2:\ Add The Loc to this varible Dir = "\Place Path Here"

3:\ Deletes this folder and it contents Fso.DeleteFolder(Loc & Dir)

4:\ Deletes the VBS script Fso.DeleteFile(WScript.ScriptFullName)

Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Loc : Loc = Fso.GetParentFolderName(WScript.ScriptFullName)
Dim Dir : Dir = "\Place Path Here" '<- Place The Folder Path Here
If Fso.FolderExists(Loc & Dir) Then
Fso.DeleteFolder(Loc & Dir),True '<- Deletes All The Contents
Fso.DeleteFile(WScript.ScriptFullName) '<- Deletes The VBS Script
End If
MsgBox "Deleted This Folder And Contents" & vbCrLf &_
" " & Chr(187) & " " & Loc & Dir, 0 + 32 + 4096, "Remove Folder"

Link to comment
Share on other sites

A chef may use a frying pan, but what is it?

A shallow, long-handled, circular metal container, usually 8, 10 and 12 inches in diameter; used for frying food. Also called skillet; also called regionally fry pan, spider.

[jaclaz]

We technicians have the habit of referring to those, respectively, as SMALL, MEDIUM and LARGE pan, or as #1,#2 and #3 skillet. B)

Using the correct words helps! :whistle:

@jaclaz

This definition is from answers.com.

They describe an item in a way that the layman can understand. Ordinary language NOT technical or professional language.

:D

Edited by the_doc735
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...