Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Defrag from the command prompt?

Author
Message
Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 16th Dec 2007 11:43
Hi all.

Just want to know how to defrag from the command prompt. I know it is possible with the "defrag" command, but I do not know how. Can anyone help me?

Take care,
Mr Z.

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Dec 2007 12:18
defrag /? (my way of saying RTFM in console-speak)


Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 16th Dec 2007 12:31 Edited at: 16th Dec 2007 12:42
The thing is that when I use that an new terminal window is opend and closes within much less then an second...

EDIT:

Ok, I solved that problem myself. However, "defrag /C -a" does not work at all. It just states that "/C" is an unknown paramiter. I got the same problem if I try:



What am I doing wrong?

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 16th Dec 2007 13:40
It's just defrag C: -a and then defrag C:

Some people really ought to know more about the good 'ol command line


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 16th Dec 2007 13:50
Thanks . Defraging the HD now.

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 16th Dec 2007 18:43
Quote: "Some people really ought to know more about the good 'ol command line"

Yes.


Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th Dec 2007 19:37
Quote: "The thing is that when I use that an new terminal window is opend and closes within much less then an second..."


Run 'cmd' instead, THEN run 'defrag'.

If you're 'clever' then you could create a batch file (a text file with .bat on the end instead of .txt) and put defrag lines in for each partition and then another line at the end to shut it down (either 'shutdown -s' or 'shutdown -s -t0' - I cant remember...)

[center]
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 16th Dec 2007 19:42
Shutdown -s -t "01"


Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 16th Dec 2007 20:10
Quote: "Run 'cmd' instead, THEN run 'defrag'."


Sorry, I´m just so used to ubuntu by now I call it terminal by defult . Anyway, I will look into that batch file thing. Could be useful.

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Dec 2007 21:46
There's a switch you can use when calling the command from the Run field that will keep the prompt open after the command finishes, I just can't remember what it was.


SunnyKatt
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: USA
Posted: 17th Dec 2007 02:02 Edited at: 17th Dec 2007 02:02
ooo - this should help. (me)
you see, ive been having uber-xtrm issues with my pc lately. One day, while virus-scanning, a little message box is the bottom corner of the screen popped up. It said : (something).exe - corrupt file. The file or directory C:/$mft is corrupt and unreadable. Please run the Chkdsk utility.
So i ran the Checkdisk utility. It says: The computer will check the disk when you reboot. So i rebooted. Now it says:
Checking disc C.
The file type is Nfts(or something like that).
The volume cannot be opened for direct access.
Windows has finished checking the disk.
Crap. I figured defraging would help. So I open up the disk defragmenter. It says: Disk checking is scheduled for disk C: Please check the disk. So it wont let me defrag. GRR. And i cant un-shedule the checkdisk, and then it doesn't work. So i'm stuck in this endless angry cycle, maybe this command prompt line will help. (the virus scanner works too, weird)

The Fluffum War - Multiplayer Demo coming soon!
http://forum.thegamecreators.com/?m=forum_view&t=115938&b=8&p=0
Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 17th Dec 2007 18:33
Aoutch, I really hope your problems get better. Goodluck.

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Dec 2007 01:57
Ha, I remembered!

RUN -> cmd /k defrag c:

the /k will keep the command prompt open when running cmds that way.


Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 18th Dec 2007 09:07
Thanks . That will help me. Because I made some batch files that defrag that two hds I have (or analyse if they need to be defraged), and the command prompts close when they are done. So thanks .

Darknes, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.

Login to post a reply

Server time is: 2024-11-19 15:30:27
Your offset time is: 2024-11-19 15:30:27