Jump to content











Photo
- - - - -

[script] Contig


  • Please log in to reply
4 replies to this topic

#1 Olri

Olri

    Newbie

  • Members
  • 22 posts

Posted 20 July 2006 - 08:10 PM

:P I wrote my 1st script. It'll put contig into the system32 folder. Contig is a free defragmenter from SysInternals.

Also I wrote a batch (BAT) file which can defragment/analyze the C: drive. :P If you want to use it then just stick it in the Contig folder with contig.exe

Attached File  Contig.script   10.92KB   429 downloads

:P Won't let me uplaod the BAT file so ima just post the code right here, all you have to do is c/p and name it ContigConsole.bat

@echo off

cls

:START

echo.

echo a: Analyze

echo aq: Analyze quiet mode

echo d: Defrag

echo e: Exit

echo Press CTRL + C to cancel at any time

set choice=

set /p choice=Choose a letter: 

if not '%choice%'=='' set choice=%choice:~0,1%

if '%choice%'=='a' goto ANALYZE

if '%choice%'=='aq' goto AQUIET

if '%choice%'=='d' goto DEFRAG

if '%choice%'=='e' goto EXIT

ECHO "%choice%" is not valid please try again

ECHO.

goto START

:ANALYZE

contig -a -s "C:\*"

goto START

:AQUIET

contig -a -s -q "C:\*"

goto START

:DEFRAG

contig -s "C:\*"

goto START

:EXIT

pause


#2 CWorks

CWorks

    Newbie

  • .script developer
  • 11 posts
  • Location:In the woods smoking the evidence
  • Interests:Digging holes 6' deep
    making the easy things look hard
    doing the impossible and tell others it is
  •  
    United States

Posted 20 July 2006 - 09:33 PM

you need to add the .txt extension in order to attach .cmd or .bat files
or any other type not allowed

#3 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 20 July 2006 - 09:40 PM

Welcome back Cworks!! :P

Both .cmd and .bat are now accepted as attachements.. :P

#4 Olri

Olri

    Newbie

  • Members
  • 22 posts

Posted 21 July 2006 - 02:00 PM

Both .cmd and .bat are now accepted as attachements.. :P

:P Still says "cant uplaod file with that extension"

#5 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 July 2006 - 02:06 PM

hmmm.. :P

I'll dive into another look to see what's going wrong.. :P




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users