Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Routine backup through autoexec.bat file

Status
Not open for further replies.

id29

IS-IT--Management
Sep 28, 2001
4
IN
I am just exploring the option of making backup of files from c:\abc folder to d:\xyz folder through autoexec.bat file, on 1st day of every month. I am using Windows 95 OS.

To do this one needs to know how to program an autoexec.bat file. I am a novice in this respect.

Any help regarding this will be highly appreciated.
 
Batch file programming is much too big a subject to cover here, especially if you are a novice. I would recommend the following site
for an excellent tutorial on the subject, but there are hundreds of sites around that are probably as good. Also many books, if you can get your hand on one of the original MS-Dos manuals, v.6 or 6.2 which were supplied with Win 3.1 they also cover the subject.
I do a similar thing to what you ask but do not use autoexec.bat, instead I shut down my system from a desktop shortct and have a batch file linked to that. The command line to shut down windows is
C:\WINDOWS\RUNDLL32.EXE C:\WINDOWS\SYSTEM\SHELL32.DLL,SHExitWindowsEx 5
(all one line)
There are other variations of this but this is the one I have found to be the best
 
Mulga has the right idea about shutting down from a desktop icon. My shutdown takes less than 5 seconds. Here is some more information to take that further.Shutting Down with an Icon
How to shutdown your computer from a desktop icon. Note: This procedure does not work with Windows NT or 95.

Step 1. Right-click on your desktop for context window and select New; then click on Shortcut.

Step 2. Type the following line in the Command line space:
To Shut Down:
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 1

To Log Off:
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 0

To Restart:
C:\WINDOWS\RUNDLL32.EXE shell32,SHExitWindowsEx 2
Note: two spaces in the command lines: The first between EXE and shell32, and the second between Ex and the numeral.

Step 3. Click on Next and type Shutdown, in place of Rundll.

Step 4. Click on Finish and an Icon will appear on the desktop labeled Shutdown.

Step 5. Double click on this Icon to shutdown your computer.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top