Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Useful Batch Files

- - - - -

  • Please log in to reply
9 replies to this topic

#1
eyeball

eyeball

    Have you tried turning it off and on again?

  • Member
  • PipPipPipPipPipPip
  • 1,150 posts
  • Joined 28-October 05
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


How to remove advertisement from MSFN

#2
Sonic

Sonic

    Sonic

  • Patrons
  • 1,603 posts
  • Joined 04-December 03

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


Why you can't use Ghost ?!

#3
eyeball

eyeball

    Have you tried turning it off and on again?

  • Member
  • PipPipPipPipPipPip
  • 1,150 posts
  • Joined 28-October 05
ghost?

#4
Sonic

Sonic

    Sonic

  • Patrons
  • 1,603 posts
  • Joined 04-December 03
In fact you want to backup your disk no ?

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

#5
eyeball

eyeball

    Have you tried turning it off and on again?

  • Member
  • PipPipPipPipPipPip
  • 1,150 posts
  • Joined 28-October 05

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)

#6
Sonic

Sonic

    Sonic

  • Patrons
  • 1,603 posts
  • Joined 04-December 03
hmm okay ! i'm french so excuse me for the mistake ...

#7
eyeball

eyeball

    Have you tried turning it off and on again?

  • Member
  • PipPipPipPipPipPip
  • 1,150 posts
  • Joined 28-October 05
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

#8
hazard_abio

hazard_abio

    Newbie

  • Member
  • 41 posts
  • Joined 21-February 05

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)

#9
gunsmokingman

gunsmokingman

    MSFN Master

  • Super Moderator
  • 2,419 posts
  • Joined 02-August 03
  • OS:none specified
  • Country: Country Flag
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




GunSmokingMan



#10
eyeball

eyeball

    Have you tried turning it off and on again?

  • Member
  • PipPipPipPipPipPip
  • 1,150 posts
  • Joined 28-October 05

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, 22 November 2005 - 10:39 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN