|
Home > Archive > General Discussion > March 2002 > batch file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| eric1971 2002-03-22, 4:02 pm |
| On a Win 95 machine I'm trying to create a batch file that will automatically defrag the c: drive. The problem is that a window pops up when the disk is not heavily fragmented and says "you do not need to run defrag now, if you want to anyway click on start. I want to force it to run every time without user interaction. Any ideas? | |
| TW2001 2002-03-22, 4:25 pm |
| This going back..
Try this switch
/NOPROMPT | |
| wbafrank 2002-03-22, 4:36 pm |
| Right-click the Start button and choose Open or Explore. Locate the Defrag Shortcut, which is in your Windows/Start Menu/Programs/Accessories/System Tools folder. (To make a shortcut for your desktop, right-click the Defrag icon, drag it to the desktop, and choose either Copy Here or Create Shortcut(s) Here.) Press Alt+Enter to open the Properties screen, click the Shortcut tab, then click at the end of the command line in the Target box. Then add the appropriate command switches (separated by spaces) to make Defrag perform as you like. Switches are as follows: For scanning a particular drive, type its letter followed by a colon (A:, C:,. etc.). For scanning all (non-networked) drives, don't type any drive letters, just type /ALL. To have Defrag only defragment files without consolidating free space on your hard drive, type /U. To consolidate free space without file degragmentation, type /Q. To do both, type /F. (You can't use more than one of these three switches at a time.) For Defrag to start and stop without your input, type /NOPROMPT. To have Defrag display the disk map that symbolizes the defragging process, type /DETAILED. Otherwise you'll get the small Defrag window. Your command line might look something like this: C:\WINDOWS\DEFRAG.EXE /ALL /F /NOPROMPT , to make Defrag defrag and consolidate free space on all local hard drives, and automatically exit when finished. | |
| eric1971 2002-03-22, 5:15 pm |
| Thanks for the help guys. |
|
|
|
|