Jump to content

Useful Batch Files


eyeball

Recommended Posts

i was wondering what automated tasks/batch files/scripts do you guys have running on your computers?

i have the following running daily:

1) a script for each HDD i have that exports the contents to a txt file

2) a script that copys the txt file to every other drive

(this is so i know what was on the drive should one of them ever fail)

3) a script that copies the my pictures folder from another computer (to back them up)

4) a logon script that authenticates me with the other computer (so i can access files without authentication)

5) a logon script that adds the MAC address of the other computer to the arp cache (so it doesnt have to bother broadcasting to find it out)

im also going to make a script that defrags a drive silently (a different hdd each day of the week in my case)

also i was thinking about a desktop cleanup script that just copies the junk from my desktop to a folder somewhere, therefore forcing me to clean it up

anyone have any input on this?

thanks

Link to comment
Share on other sites


In fact you want to backup your disk no ?

To perfect backup, use Norton Ghost from Symantec, don't know it ?!

lol!, iv heard of norton ghost and you have misunderstood me..

all my stuff is backed up and archived on DVD's already the point of the txt files is so that if a drive failed then i knew what was on it, so i can then rebuild it exactly as it was (using the DVD's)

Link to comment
Share on other sites

so no one else has any batch files running that they find useful or that others might find useful?

come on! inspire me!!! :w00t:

thanks

Alright you lazy person you. Here is a start. :P

for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
IF EXIST %%a: (DIR %%a:\*.* /s/a > %%a:\%%a_DRIVE.TXT)
)

You can have fun figuring out the rest. B)

Link to comment
Share on other sites

I do not use batch files to much I am more in to VBS script

Here one that starts the CleanMgr

Save As CleanMgr.VBS

Dim Act : Set Act = CreateObject("Wscript.shell")

Act.run ("cleanmgr /sagerun:99"),1 , True : Act.popup "Completed The Clean Up", 3 , "Clean Mgr", 0 + 32

This I use to Defrag my Hard Drives

Save As Defrag_Drv.VBS

Const HD = 2

Dim Act, Fso

Set Act = CreateObject("Wscript.Shell")

Set Fso = CreateObject("Scripting.FileSystemObject")

Set Drv = Fso.Drives

For Each objDrv in Drv

If objDrv.DriveType = HD Then

Act.Popup "Preparing To Defrag This Drive = " & objDrv.DriveLetter & "\" &_

vbCrLf & "Drive Name = " & objDrv.VolumeName, 5, "Defrag Drive", 0 + 32

Act.Run("Defrag.exe " & objDrv & "\ -F"),1,True

End if

Next

Link to comment
Share on other sites

Alright you lazy person you. Here is a start. :P

for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
IF EXIST %%a: (DIR %%a:\*.* /s/a > %%a:\%%a_DRIVE.TXT)
)

You can have fun figuring out the rest. B)

thanks for that :)

i guess it checks if a drives exists and if so creates a txt file of its contents :)

and im not lazy i just want to see what other people currently have automated on their systems, honest!

Also gunsmoking man those are good scripts too!, guess im gonna have to start learning vbs scripting

Edited by eyeball
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...