A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » Software & Applications
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

.BAT FILE



 
 
Thread Tools Display Modes
  #1  
Old October 4th 04, 09:11 PM
external usenet poster
 
Posts: n/a
Default .BAT FILE

Hi, in the organisation where i am working, the person
who was working before me created a .BAT file on the
server (workgroup). My understanding is that this .BAT
file should be on every computer and im not sure what
this .BAT file does.

I have the .BAT file in notepad. I want to learnt what
each line does (about 50 odd lines). where do i start?
The following is the bat file:

@echo off
cls
echo LIA
deltree /y c:\windows\recent\*.* /y c:\windows\favori~1
\*.* /y c:\windows\temp\*.tmp /y c:\windows\*.tmp /y
c:\windows\*.bmp /y c:\windows\system\3dflow~1.scr /y
c:\windows\system\3dflyi~1.scr /y
c:\windows\system\3dmaze~1.scr /y
c:\windows\system\3dtext~1.scr /y
c:\windows\system\flying~1.scr /y c:\windows\channe~1.scr
c:\windows\desktop\*.*

cd \
deltree /y c:\windows\startm~1\*.*
cd c:\windows\startm~1\

md Control.{21ec2020-3aea-1069-a2dd-08002b30309d}
cd c:\windows\startm~1\13:10 03/02/03
md Programs
cd c:\windows\startm~1\programs\
md Accessories
md Office
md Startup


cd \
copy \\pc1\look_copy\startup\startm~1\*.*
c:\windows\desktop\*.*

cd \
copy \\Pc1\look_copy\startup\startm~1\contro~1.{21
c:\windows\startm~1\*.*

rem access
Cd \
copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*

rem office
cd \
copy \\pc1\look_copy\startup\startm~1\programs\office\* .*
c:\windows\startm~1\programs\office\*.*

rem startup
cd \
copy \\pc1\look_copy\startup\startm~1
\programs\startup\*.* c:\windows\startm~1
\programs\startup\*.*

attrib +h c:\windows\startm~1\programs\startup

rem start menu
Cd \
copy \\pc1\look_copy\startup\startm~1\*.*
c:\windows\startm~1\*.*

cd \
copy \\pc1\look_copy\startup\startm~1\contro~1.{21
c:\windows\startm~1\*.*

rem copy programs
Cd \
copy \\pc1\look_copy\startup\startm~1\programs\*.*
c:\windows\startm~1\programs\*.*

rem examples
Cd \
copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*


attrib +h c:\windows +h c:\recycle +h +r c:\progra~1

rem time 14:50
rem date 11-19-2002

deltree /y c:\recycled\*.*

deltree /y c:\windows\*.bmp

cd \
copy \\pc1\Look_Copy\startup\LIASetup.bmp c:\windows\*.*
cd \
copy \\pc1\Look_Copy\startup\windows\*.* c:\windows\*.*

exit


regards


  #2  
Old October 5th 04, 01:29 AM
Andrew H. Carter
external usenet poster
 
Posts: n/a
Default

On Mon, 4 Oct 2004 13:11:39 -0700,
scribbled some
thoughts:

NOTE: Best viewed in a fixed pitch font

Hi, in the organisation where i am working, the person
who was working before me created a .BAT file on the
server (workgroup). My understanding is that this .BAT
file should be on every computer and im not sure what
this .BAT file does.

I have the .BAT file in notepad. I want to learnt what
each line does (about 50 odd lines). where do i start?
The following is the bat file:


NOTE: It's always best to reply in the same thread. Also
replies will be to the newsgroup 999999 times out of
1000000. That aside, that BAT should NOT be on every
machine, unless they want to recreate it:


@echo off
cls


CLS clears the screen

echo LIA


ECHO types what follows the command to the screen.

deltree /y c:\windows\recent\*.* /y c:\windows\favori~1
\*.* /y c:\windows\temp\*.tmp /y c:\windows\*.tmp /y
c:\windows\*.bmp /y c:\windows\system\3dflow~1.scr /y
c:\windows\system\3dflyi~1.scr /y
c:\windows\system\3dmaze~1.scr /y
c:\windows\system\3dtext~1.scr /y
c:\windows\system\flying~1.scr /y c:\windows\channe~1.scr
c:\windows\desktop\*.*


Okay, the above is totally wacky, though it may be due to
line wrapping, still:

DELTREE deletes the contents of folders and/or folders,
depending on how the command is issued. Unless you know
what you are doing, it is best to be left alone. In the
above example: "deltree /y c:\windows\recent\*.*" the only
files/folders deleted would be the Recent docs. But the
writer was wanting to delete those contents as well as the
TMP files, BMP files, etc... However a better command
(safer) for individual files would be DEL. The SCR files
are screensavers, so their desire was to delete the
screensavers.

cd \


The above command switches to the root drive.

deltree /y c:\windows\startm~1\*.*


The above command would delete the Start Menu contents

cd c:\windows\startm~1\



The above command switches to the Start Menu


md Control.{21ec2020-3aea-1069-a2dd-08002b30309d}


The above command creates a directory to make a shortcut to
the Control Panel in the Start Menu

cd c:\windows\startm~1\13:10 03/02/03


The above command switches to a folder (if it exists), but
that time date won't work.

md Programs


The above command creates a directory "Programs" as a
subdirectory of the Start Menu.

cd c:\windows\startm~1\programs\


The above command switches to Programs.

md Accessories
md Office
md Startup


The above commands create directories: Accessories, Office
and Startup as subdirectories of "Programs"

cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\*.*
c:\windows\desktop\*.*


A line wrap occurred above
cd \


The above command switches to the root drive.

copy \\Pc1\look_copy\startup\startm~1\contro~1.{21
c:\windows\startm~1\*.*

rem access
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*

rem office
cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\office\* .*
c:\windows\startm~1\programs\office\*.*

rem startup
cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1
\programs\startup\*.* c:\windows\startm~1
\programs\startup\*.*

attrib +h c:\windows\startm~1\programs\startup

rem start menu
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\*.*
c:\windows\startm~1\*.*

cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\contro~1.{21
c:\windows\startm~1\*.*

rem copy programs


REM (or better to use "::" as it is ignored/skipped) is a
comment line. It is read but not acted upon.

Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\*.*
c:\windows\startm~1\programs\*.*


Copies the files from one location to C:\Windows\Start
Menu\Programs\

rem examples
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*


Copies the files from one location to C:\Windows\Start
Menu\Programs\Accessories


attrib +h c:\windows +h c:\recycle +h +r c:\progra~1


ATTRIB sets/removes attributes depending on how such are
used, in the above it sets the attributes for the folders.

rem time 14:50
rem date 11-19-2002


REM (or better to use "::" as it is ignored/skipped) is a
comment line. It is read but not acted upon.


deltree /y c:\recycled\*.*


Deletes the contents of the Recycle Bin

deltree /y c:\windows\*.bmp


Deletes all BMP files residing in C:\Windows


cd \


The above command switches to the root drive.

copy \\pc1\Look_Copy\startup\LIASetup.bmp c:\windows\*.*


Copies the file from one location to C:\Windows

cd \


The above command switches to the root drive.

copy \\pc1\Look_Copy\startup\windows\*.* c:\windows\*.*


Copies the files from one location to C:\Windows

exit



Exits out of DOS/the program.

regards



I've skipped a few lines, but you can tell what they are by
comparing. Also this link may prove helpful, while the
commands are for MSDOS 6.22 (Windows 98 having 7.10), still
many of the commands are used.

http://www.vfrazee.com/ms-dos/6.22/help/index.htm

--
Sincerely, | (©) (©)
| ------ooo--(_)--ooo------
Andrew H. Carter | /// \\\
d(-_-)b |
  #3  
Old October 5th 04, 11:06 AM
external usenet poster
 
Posts: n/a
Default

Hi, thanks for your help and efforts on my query. i=20
really appreciate it. I am very new to batch files and=20
DOS, so it may take me a bit of time to understand hwta=20
is going on. if i wanted to learn the basics to more=20
advanced features of batch files, where could i start?=20
can you recommend a few books?

regards


-----Original Message-----
On Mon, 4 Oct 2004 13:11:39 -0700,
scribbled some
thoughts:
=20
NOTE: Best viewed in a fixed pitch font=20

Hi, in the organisation where i am working, the person=20
who was working before me created a .BAT file on the=20
server (workgroup). My understanding is that this .BAT=20
file should be on every computer and im not sure what=20
this .BAT file does.

I have the .BAT file in notepad. I want to learnt what=20
each line does (about 50 odd lines). where do i=20

start? =20
The following is the bat file:


NOTE: It's always best to reply in the same thread. =20

Also
replies will be to the newsgroup 999999 times out of
1000000. That aside, that BAT should NOT be on every
machine, unless they want to recreate it:


@echo off
cls


CLS clears the screen

echo LIA


ECHO types what follows the command to the screen.

deltree /y c:\windows\recent\*.* /y c:\windows\favori~1
\*.* /y c:\windows\temp\*.tmp /y c:\windows\*.tmp /y=20
c:\windows\*.bmp /y c:\windows\system\3dflow~1.scr /y=20
c:\windows\system\3dflyi~1.scr /y=20
c:\windows\system\3dmaze~1.scr /y=20
c:\windows\system\3dtext~1.scr /y=20
c:\windows\system\flying~1.scr /y=20

c:\windows\channe~1.scr=20
c:\windows\desktop\*.*


Okay, the above is totally wacky, though it may be due to
line wrapping, still:

DELTREE deletes the contents of folders and/or folders,
depending on how the command is issued. Unless you know
what you are doing, it is best to be left alone. In the
above example: "deltree /y c:\windows\recent\*.*" the=20

only
files/folders deleted would be the Recent docs. But the
writer was wanting to delete those contents as well as=20

the
TMP files, BMP files, etc... However a better command
(safer) for individual files would be DEL. The SCR files
are screensavers, so their desire was to delete the
screensavers.

cd \


The above command switches to the root drive.

deltree /y c:\windows\startm~1\*.*


The above command would delete the Start Menu contents

cd c:\windows\startm~1\



The above command switches to the Start Menu


md Control.{21ec2020-3aea-1069-a2dd-08002b30309d}=20


The above command creates a directory to make a shortcut=20

to
the Control Panel in the Start Menu

cd c:\windows\startm~1\13:10 03/02/03


The above command switches to a folder (if it exists),=20

but
that time date won't work.

md Programs=20


The above command creates a directory "Programs" as a
subdirectory of the Start Menu.

cd c:\windows\startm~1\programs\


The above command switches to Programs.

md Accessories=20
md Office
md Startup


The above commands create directories: Accessories,=20

Office
and Startup as subdirectories of "Programs"

cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\*.*=20
c:\windows\desktop\*.*


A line wrap occurred above
cd \


The above command switches to the root drive.

copy \\Pc1\look_copy\startup\startm~1\contro~1.{21=20
c:\windows\startm~1\*.*

rem access
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*=20

rem office
cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1

\programs\office\*.*=20
c:\windows\startm~1\programs\office\*.*=20

rem startup
cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1
\programs\startup\*.* c:\windows\startm~1
\programs\startup\*.*=20

attrib +h c:\windows\startm~1\programs\startup

rem start menu
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\*.*=20
c:\windows\startm~1\*.*=20

cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\contro~1.{21=20
c:\windows\startm~1\*.*=20

rem copy programs


REM (or better to use "::" as it is ignored/skipped) is a
comment line. It is read but not acted upon.

Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\*.* =20
c:\windows\startm~1\programs\*.*=20


Copies the files from one location to C:\Windows\Start
Menu\Programs\

rem examples
Cd \


The above command switches to the root drive.

copy \\pc1\look_copy\startup\startm~1\programs\access~1
\*.* c:\windows\startm~1\programs\access~1\*.*=20


Copies the files from one location to C:\Windows\Start
Menu\Programs\Accessories


attrib +h c:\windows +h c:\recycle +h +r c:\progra~1


ATTRIB sets/removes attributes depending on how such are
used, in the above it sets the attributes for the=20

folders.

rem time 14:50=20
rem date 11-19-2002


REM (or better to use "::" as it is ignored/skipped) is a
comment line. It is read but not acted upon.


deltree /y c:\recycled\*.*


Deletes the contents of the Recycle Bin

deltree /y c:\windows\*.bmp


Deletes all BMP files residing in C:\Windows


cd \


The above command switches to the root drive.

copy \\pc1\Look_Copy\startup\LIASetup.bmp c:\windows\*.*


Copies the file from one location to C:\Windows

cd \


The above command switches to the root drive.

copy \\pc1\Look_Copy\startup\windows\*.* c:\windows\*.*


Copies the files from one location to C:\Windows

exit



Exits out of DOS/the program.

regards



I've skipped a few lines, but you can tell what they are=20

by
comparing. Also this link may prove helpful, while the
commands are for MSDOS 6.22 (Windows 98 having 7.10),=20

still
many of the commands are used.

http://www.vfrazee.com/ms-dos/6.22/help/index.htm

--=20
Sincerely, | (=A9) (=A9)
| ------ooo--(_)--ooo------
Andrew H. Carter | /// \\\
d(-_-)b |
.

  #4  
Old October 5th 04, 04:25 PM
Andrew H. Carter
external usenet poster
 
Posts: n/a
Default

On Tue, 5 Oct 2004 03:06:14 -0700,
scribbled some
thoughts:

NOTE: Best viewed in a fixed pitch font

Hi, thanks for your help and efforts on my query. i
really appreciate it. I am very new to batch files and
DOS, so it may take me a bit of time to understand hwta
is going on. if i wanted to learn the basics to more
advanced features of batch files, where could i start?
can you recommend a few books?

regards



Newsgroup: news:alt.msdos
news:alt.msdos.batch

Book: Running MS-DOS version 6.22 20th Anniversary Edition
by Van Wolverton published by Microsoft Press. (Bought
mine at Books-A-Million for $29.99)

Website with 6.22 commands:
http://www.vfrazee.com/ms-dos/6.22/help/index.htm

Mind you 98/98SE has MS-DOS 7.10 but many of the commands
are still used, a few dropped and some can be found on the
installation disk at the directory:

tools\oldmsdos

--
Sincerely, | (©) (©)
| ------ooo--(_)--ooo------
Andrew H. Carter | /// \\\
d(-_-)b |
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.BAT file Software & Applications 1 October 4th 04 08:28 PM
Help! SE won't boot Ken Knecht Setup & Installation 8 October 2nd 04 01:55 PM
Folder Named [C:\Program] Opens Automatically on Start Ted Belben General 2 September 16th 04 11:39 PM
Please help! Display settings !! Mitzi Monitors & Displays 12 July 11th 04 05:19 AM
Win98SE - problem with USB printer HBYardSale Software & Applications 2 June 20th 04 06:27 PM


All times are GMT +1. The time now is 05:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.