The power of batch files

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
For those that used DOS years ago, batch files (.bat) were really handy little scripts that you could run to perform quick tasks.

I thought I'd seen the last of them years ago, however I've spent a couple of hours making & testing a backup script for the server which automates the last thing I had to do manually. It's easy to forget how powerful batch files can be!

This thing lets me zip up all the files on the server, name them by date, FTP them to a remote server and clean up the temp files that are left over. All in about 15 lines :D

I forgot how much I like using DOS! ;)
 
Joined
Mar 5, 2004
Messages
1,736
Reaction score
123
Haha, im with you Ian!! When i used to work in that computer shop, we started building PC's with Dos 6.22 and Windows 3.11. Used to really enjoy configuring computers using the Autoexec.bat and Config.sys files etc. I dropped out of computing for a few years and now i am no where near as good as i was at configuring. But give me a PC running DOS and i'll sort it out!! :lol:

Bring back DOS!! Lets start a campaign!! Who needs this GUI Vista crap!! :)
 

floppybootstomp

sugar 'n spikes
Moderator
Joined
Mar 5, 2002
Messages
20,281
Reaction score
1,794
I still have the instructions on how to compile a batch file written in a notebook somewhere.

Also still have the official manuals for DOS 5 & DOS 6. Still look at them occasionally.

I think the last batch file I wrote was to make Quake 1 load from a desktop icon in Win 98.
 
Joined
Jan 14, 2006
Messages
12,268
Reaction score
283
I had a few DOS questions on the Software paper for my A+ exam in 2006.:thumb:
It's now not part of the exam at all!
 

muckshifter

I'm not weird, I'm a limited edition.
Moderator
Joined
Mar 5, 2002
Messages
25,739
Reaction score
1,204
Ian, I had to smile ... .BAT files have never died. ;)


A Vista example ...

Open Notepad and type the following on the first line:

cd C:\Users\%username%\AppData\Local

and on the second line type:

rmdir /S /Q Temp

and save the file to your desktop, or any location, as ... removeTemp.bat


It's a simple .BAT file for removing your temp files ... in Vista, only files older than a week are deleted using their built-in cleanup tools ... the .BAT file above deletes all. ;)

You do need to use separate lines in Vista. :thumb:

There is also a "fix" if your .BAT files do not 'execute' but just open notepad. :D


One of the first thing one learnt in "those days" was how to write a .BAT file.
laughingsmiley.gif



user.gif
 

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

Top