or you could add an addition line in the batch file with the pause command
so you can see the output before the window closes
"Ramesh, MS-MVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
The shortcut and the parameters are correct. When you run the shortcut, it
defragments the drive, and provides you with a report similar to this:
- - -
C:\Documents and Settings\Ramesh>defrag c:\ -f
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International,
Inc.
Analysis Report
3.90 GB Total, 3.21 GB (82%) Free, 0% Fragmented (0% file
fragmentation)
Defragmentation Report
3.90 GB Total, 3.21 GB (82%) Free, 0% Fragmented (0% file
fragmentation)
- - -
Because you're the console utility from a shortcut, the Command window
closes immediately before you can read the output. The job, however, is done
correctly. To be sure, open a Command Prompt window and type:
defrag c: -f
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting
http://www.winhelponline.com
"Joel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
%windir%\system32\defrag.exe C:\ -f
I have this in the target line of a shortcut on my desktop, but when I run
it, it seems to only give me the status. I want to be able to click just one
time on a shortcut or bat file on my desktop to defrag my C drive. Isn't
there someway to do this?
Thanks.