Computing.Net > Forums > Programming > Defrag batch script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Defrag batch script

Reply to Message Icon

Name: xsystemx
Date: June 24, 2008 at 08:03:37 Pacific
OS: WinXP
CPU/Ram: 1024MB
Product: HP
Comment:

Trying to make the following script work:

@echo off
REM echo #####Defragmentation will now begin#####
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set mdate=%%A%%B%%C
date /t >> c:\defrag_log.txt
echo %mdate% >> c:\defrag_log.txt
defrag c: -v >> c:\defrag_log.txt

Getting the following error:
The process cannot access the file because it is being used by another process.

Please help.
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 24, 2008 at 20:59:10 Pacific
Reply:

Something has c:\defrag_log.txt open; either your AV (disable it), or you (close it).


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Defrag batch script

batch script to parse filenames www.computing.net/answers/programming/batch-script-to-parse-filenames/15286.html

Batch Script Help Needed www.computing.net/answers/programming/batch-script-help-needed/14475.html

batch script www.computing.net/answers/programming/batch-script/14086.html