Page 1 of 1
Useful Batch Files
#1
Posted 20 November 2005 - 04:24 PM
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
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
#2
Posted 20 November 2005 - 04:51 PM
#4
Posted 20 November 2005 - 05:26 PM
In fact you want to backup your disk no ?
To perfect backup, use Norton Ghost from Symantec, don't know it ?!
To perfect backup, use Norton Ghost from Symantec, don't know it ?!
#5
Posted 21 November 2005 - 01:22 AM
sonic, on Nov 20 2005, 05:26 PM, said:
In fact you want to backup your disk no ?
To perfect backup, use Norton Ghost from Symantec, don't know it ?!
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)
#6
Posted 21 November 2005 - 05:35 AM
hmm okay ! i'm french so excuse me for the mistake ...
#7
Posted 21 November 2005 - 04:28 PM
so no one else has any batch files running that they find useful or that others might find useful?
come on! inspire me!!!
thanks
come on! inspire me!!!
thanks
#8
Posted 22 November 2005 - 07:55 AM
eyeball, on Nov 21 2005, 05:28 PM, said:
so no one else has any batch files running that they find useful or that others might find useful?
come on! inspire me!!!
thanks
come on! inspire me!!!
thanks
Alright you lazy person you. Here is a start.
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.
#9
Posted 22 November 2005 - 08:19 AM
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
This I use to Defrag my Hard Drives
Save As Defrag_Drv.VBS
Here one that starts the CleanMgr
Save As CleanMgr.VBS
Quote
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
Act.run ("cleanmgr /sagerun:99"),1 , True : Act.popup "Completed The Clean Up", 3 , "Clean Mgr", 0 + 32
Save As Defrag_Drv.VBS
Quote
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
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
#10
Posted 22 November 2005 - 10:35 AM
Quote
Alright you lazy person you. Here is a start.
You can have fun figuring out the rest.
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.
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
This post has been edited by eyeball: 22 November 2005 - 10:39 AM
Share this topic:
Page 1 of 1



Help

Back to top









