Tweaking.com Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Tweaking.com Support Forums
»
Main Forum
»
Everything Else
(Moderators:
Shane
,
Boggin
,
Julian
) »
Defragment
« previous
next »
Print
Pages: [
1
]
2
3
Go Down
Author
Topic: Defragment (Read 43080 times)
0 Members and 1 Guest are viewing this topic.
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Defragment
«
on:
October 29, 2012, 12:56:12 pm »
Hey Guys
Looking for a way to completely defrag my drives without using third party defragmenters. I read somewhere that -w switch is not supported in windows 7. Is this true? Normally I use "defrag c: -v -w".
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #1 on:
October 29, 2012, 01:14:55 pm »
Put this in a bat file
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: /H /V
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: /H /V /X
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #2 on:
October 29, 2012, 01:20:55 pm »
What do these do and how do I put into a bat file?
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #3 on:
October 29, 2012, 01:45:58 pm »
Here is mine I run before I head to bed.
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #4 on:
October 29, 2012, 01:46:15 pm »
Will this do all drives at once?
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #5 on:
October 29, 2012, 01:47:19 pm »
Just the C: drive. If you want to add other drives you do it like this, you will see D: is added
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: D: /H /V
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: D: /H /V /X
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #6 on:
October 29, 2012, 01:49:37 pm »
Thanks for that. Right when you sent it I figured out how to make bat file. It was easier than I thought. Good to know.
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #7 on:
October 29, 2012, 01:54:58 pm »
Wooo I got this.
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #8 on:
October 29, 2012, 01:57:10 pm »
I bet you have UAC enabled, right click on the bat file and click run as administrator
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #9 on:
October 29, 2012, 02:00:28 pm »
I have it off. Ill try as administrator. I checked and it is there.
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #10 on:
October 29, 2012, 02:02:10 pm »
Nope, same thing...uhhmm.
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #11 on:
October 29, 2012, 02:03:59 pm »
Normal defrag works from gui
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #12 on:
October 29, 2012, 02:06:10 pm »
Very odd. Can you run it from a cmd window your self?
Also try this in the bat file
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: /H /V
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: /H /V /X
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #13 on:
October 29, 2012, 02:10:14 pm »
yep
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #14 on:
October 29, 2012, 02:12:37 pm »
OK so you can run defrag from cmd manually.
Try this, move the bat file to the root of the C: drive and try it.
I notice where you are running the bat file that there is a space in the path. That might be getting in the way.
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #15 on:
October 29, 2012, 02:19:32 pm »
Same thing
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #16 on:
October 29, 2012, 02:22:39 pm »
what the crap lol. I wonder if something is blocking the bat file?
Here is a way to test. Open a cmd.exe window and past this in
start /wait %SYSTEMDRIVE%\Windows\System32\defrag.exe C: /H /V
Does it work?
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #17 on:
October 29, 2012, 02:25:33 pm »
Yep works fine
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #18 on:
October 29, 2012, 02:29:23 pm »
Then something is blocking the bat file. What AV do you have installed?
I know Avast has a sandbox mode (Which I disable)
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #19 on:
October 29, 2012, 02:31:56 pm »
avast but it doesn't show sandbox blocking. ill trun it off and try
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #20 on:
October 29, 2012, 02:34:02 pm »
Same thing
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #21 on:
October 29, 2012, 02:36:04 pm »
Try disabling avast all together and any other protection you have and see.
Very odd something is blocking the bat file.
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #22 on:
October 29, 2012, 02:38:48 pm »
I can run other bat files. I recently had diskeeper installed (realized i don't need it). could that be the problem
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Shane
Administrator
Hero Member
Join Date: Sep 2011
Posts: 9281
Location: USA
Karma: 137
"Knowledge should be shared not hidden."
Re: Defragment
«
Reply #23 on:
October 29, 2012, 02:51:07 pm »
Dont see why it would be. You can run the commands from a cmd window but not from a bat file.
Not sure what is going on there. It is like the bat file doesnt have permission to access the system32 dir.
Shane
Logged
chris635
Sr. Member
Join Date: Nov 2011
Posts: 442
Location: USA
Karma: 11
Re: Defragment
«
Reply #24 on:
October 29, 2012, 02:52:14 pm »
Curious for sure. My system runs perfect other wise
Chris
Logged
Physical Science Technician
Avid Motorcyclist
Have a nice day - Chris
Print
Pages: [
1
]
2
3
Go Up
« previous
next »
Tweaking.com Support Forums
»
Main Forum
»
Everything Else
(Moderators:
Shane
,
Boggin
,
Julian
) »
Defragment