MSFN Forum: Useful Batch Files - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

If you have questions about customizing Windows XP that are nLite-specific, please post them in the nLite forum, not here. If you have questions regarding the unattended installation of Windows XP, please post them in the Unattended Windows 2000/XP/2003 section.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Useful Batch Files Rate Topic: -----

#1 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

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


#2 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,603
  • Joined: 04-December 03

Posted 20 November 2005 - 04:51 PM

View Posteyeball, on Nov 20 2005, 04:24 PM, said:

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


Why you can't use Ghost ?!

#3 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

Posted 20 November 2005 - 04:56 PM

ghost?

#4 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,603
  • Joined: 04-December 03

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 ?!

#5 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

Posted 21 November 2005 - 01:22 AM

View Postsonic, 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 ?!



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 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,603
  • Joined: 04-December 03

Posted 21 November 2005 - 05:35 AM

hmm okay ! i'm french so excuse me for the mistake ...

#7 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

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!!! :w00t:

thanks

#8 User is offline   hazard_abio 

  • Newbie
  • Group: Members
  • Posts: 41
  • Joined: 21-February 05

Posted 22 November 2005 - 07:55 AM

View Posteyeball, 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!!! :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 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,352
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

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

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
This I use to Defrag my Hard Drives
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


#10 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

Posted 22 November 2005 - 10:35 AM

Quote

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

This post has been edited by eyeball: 22 November 2005 - 10:39 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

4 User(s) are reading this topic
0 members, 4 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy